Caching Code Location in a Domain Driven Design

In an application that has followed a Domain Driven Design where you have the following sorts of concepts A repository that deals with the DataBase access A application service that co-ordinates interactions between enties and value objects etc. where in general would you put caching code to elimenate an expensive call to the database? I have seen code bases that just cache all over the place and it is difficult to monitor memory usage and difficult to provide guidelines to other developers

Caching Why is the default cache expires header Thu, 01 Dec 1994 16:00:00 GMT? What is the significance of this date?

When some requests are processed via WebSphere application server, it sets a cache expires header of Thu, 01 Dec 1994 16:00:00 GMT. This date seems to be in a lot of documentation as a example of a properly formed date for an expires header, but it is also all over the internet in regards to actual responses. Where does this exact date (Thu, 01 Dec 1994 16:00:00 GMT) originate from? Is this what happens when you do response.setHeader("Expires",0) is this the default value?

Caching Make Doctrine use result cache by default

I'm binding Memcache to Doctrine and it seems I have to useResultCache explicitly in every query. Is it possible to make it true by default, with the ability to useResultCache(false) where it's not needed?

Codeigniter 2.0.2 built-in caching is slower than 1.7.2

I'm not sure with the built-in web page caching in CodeIgniter 2.0.2 I am using. I just upgraded my CI version from 1.7.2 It did not have any problem at all before, the page loads really fast. but it takes the same to load the cached page, after it is cached on CI 2.0.2 I already checked the file has been created in /application/cache folder after the page load. It seems like it doesn't load the cache file. Anybody has the same problem? How can I solve this?

Caching strategy when using API's that have a limit on number of calls allowed?

I am making an app using twitter API that needs to use the twitter REST API to find the followers of a user frequently . But twitter has a restriction of 350 API requests in an hour . My App in its current state is sure to exceed that. Please tell me what kind of caching strategy should I employ to reduce the number of API calls I make and thereby improve speed of my app and the follow twitter policies without any problem.

Caching Is it possible to parse contents of ColdFusion 9.0.1 cached memory?

I've been blind sided by the change from CF8 to 9 where write to disk caching is no longer possible without creating a custom cache or some other drastic workarounds that are not worth the effort. At this time I've abandoned trying to convert the application to uphold, if possible, the same method of writing the contents of a cache file into a static cfm file. I'm more curious now that I've dug into it a bit deeper. I'm looking for someone that has more experience with this than myself. What

Caching How to serve cached pages to first time visitors?

Is there a way to cache pages from previous visitors and then share that cashe to first time visitors? I know this can't be done on client side but not sure about sever side of things. I'm hoping you can point me in the right direction and maybe some resources as I can't find find much on this.

Caching Setting both Expires and Cache-Control: max-age

Can someone clarify this statement about caching. says It is redundant to specify both Expires and Cache-Control: max-age, or to specify both Last-Modified and ETag. Then later it says The fingerprinting mechanism allows the server to set the Expires header to exactly one year ahead of the request date; the Last-Modified header to the date the file was last modified; and the Cache-Control: max-age header to 3153600. Th

Caching Haskell: partially drop lazy evaluated results

I have a very large decision tree. It is used as follows: -- once per application start t :: Tree t = buildDecisionTree -- done several times makeDecision :: Something -> Decision makeDecision something = search t something This decision tree is way too large to fit in memory. But, thanks to lazy evaluation, it is only partially evaluated. The problem is, that there are scenarios where all possible decisions are tried causing the whole tree to be evaluated. This is not going to terminate,

Caching Jboss AS7 server Jconsole.bat

I tried to access mbeans on a remotely running Jboss AS7 infinispan server using the jconsole.bat from the infinispan Jboss AS7 installation and i am gettign the following error: xception in thread "VMPanel.connect" java.lang.NoClassDefFoundError: org/jboss/logging/Logger at org.jboss.remotingjmx.RemotingConnectorProvider.<clinit>( at java.lang.Class.forName0(Native Method) at java.lang.Class.forName( at com.sun.jmx.remote.u

Grails - Full Page Caching

I'm putting up a small website where only one page needs information from a database, and the rest of the pages are static. How can I implement full page caching for those static pages while still using the default fragmented cache system for the one page that needs it? I would prefer to use the same sitemesh layout for all the pages if I can. The sitemesh layout only contains static content.

Caching Cache specifications for intel core i7

I am building a cache simulator for a intel core i7 but have a hard time finding the detailed specifications for the L1, L2 and L3 cache (shared). I need the Cacheblock size, cache size, associativity and so on... Can anyone point me in the good direction?

Caching What are good cache algorithms for sequential reads of data larger than cache size?

There are many parallel requests for elements in a collection. There are more elements than there are cache slots. All of the parallel requests request all of the elements in the collection, at slightly different times. The elements are immutable and have unique names. If the cache size is smaller than number of the elements in the collection (as it is now), cache misses are a problem. I predict cache thrashing occurs from an even distribution of requests for different elements. The cache curre

Caching How to partition the L3 cache in linux?

My intel i3 processor having L3 cache of size 3072kb i want to partition(divide) L3 cache based on the number of cores present which is 2 in intel i3 Clarkdale. If anyone have done something related to cache then please reply?

Caching AFNetworking 2 with NSURLCache doesn't work on ios8

I use AFNetworking 2 and request date with SharedInstance().GET method, but cache doesn't work on iOS 8. It request it again and again, even in offline mode. But It worked perfect on iOS 7. I tested it in simulators and real devices. Max-age header on my web-server: Cache-Control:max-age=21600 Cache setup on application didFinishLaunchingWithOptions method: let urlCache = NSURLCache(memoryCapacity: 1024*1024*4, diskCapacity: 1024*1024*5, diskPath: nil); NSURLCache.setSharedURLCache(urlCache

Caching SPA (Single-page app) load always from cache

I have a SPA (Single-Page Application) written using OpenUI5 framework. It works well (when I'm in debug mode or using cache-killer but now I have pushed the app on the server apache: here the problems started... Users not have cache-killer installed and I would like update the app on the server and immediately have the new version of the app on the users pcs at the successive refresh. In my app I have a s

Caching running tomcat as coherence node

I have a question for someone who is familiar with tomcat and coherence. I am using tomcat 8 and coherence 12.2.1 now and here I have, maybe not a problem, but interesting case. I am trying to start web application on tomcat as coherence node. I already know that there is ExtendTcpCacheService and now I am using it to make additional node which can communicate with coherence cluster. But my question is: Is there a way to make tomcat start node which IS NOT Extend? I mean, I need tomcat to sta

Caching Cloudflare's bypass cache page rule not working

I have this page, where users upload their images: I want to disable Cloudflare cache in this page, so I added the following rule: ** But it's not working at all. What's happening? Cache only works when I add this rule: **

caching images is not happening in AEM

I have the below configuration file for caching in dispatcher. I am able to cache js,css but not JPEG/PNG's. Kindly suggest me if i am going wrong somewhere? I need to cache images as well ExpiresActive On ExpiresByType text/css "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresBy

Caching InterSystems Cache class export

I am working with one project where I need to get the content of .cls file. I know how to get .xml file, however I need exact code which contains all comments and other stuff. I found a class %Dictionary.ClassDefinition which can give a class name, properties. But is there any way to get raw class code.

Caching Service discovery cache update in the case of node failure

I am trying to adopt a service discovery mechanism for my system. I have a bunch of nodes and they will communicate with each other via gRpc. Because in some frameworks like Mesos, a new node is brought up after it fails would possibly has a different ip address and a different port, I am thinking of using service discovery so that each node can have a cluster config that is agnostic to node failure. My current options are to using DNS or strongly-consistent key-value store like etcd or zookeep

Caching Redis cache strategy

I'm developing a website to display some kind of articles, just like stackoverflow. Each article contains title, description, and some frequently changed fields (like view_count). The website also supports cursor paging(max_id, since_id), filtering(by category, tags). I want to add a cache layer using Redis. Theres are some choices in my mind: Use zset to store top 1000 acticle id list. Each filter has one zset, like articles:category:{category_id} articles:tag:{tag_id}. Each zset will b

Long term caching with webpack chunkhash and cache control

I am using webpack to bundle all of my files. Inside webpack I use chunkhash, Md5Hash and manifest to produce unique chunkhash for each of my files that get download by browser. It would look like this. styles.3840duiel348fdjh385idfki.css bundle.488503289dfksdlkor93lfui.js vendor.sdkkfuuewkf892377rfkjdle.js image.dkkdiiue9984ujjkfld003kfpp.png This means that browser can cache them and if the hash is not changed it will use the cached version.At the same time I can for example just change st

Caching Rxjava2 - how to cache Observable

I am thinking the best way to cache a retrofit2 api response observable is with behaviorSubject. This would emit the last item that was sent. so i am trying to make a function that would take a boolean cache paramter to know if the response should be retrieved from cache or from retrofit2 call. The retrofit2 call just returns an observable. But lets see what i want: Here is the function before i implemented caching it just simply made a retrofit2 call to get a api response and someone subscr

Caching How to detect and refresh outdated data in React Native app with redux-persist

In a React Native app, usingRedux and Redux-Persist, what is the best way to identify what content needs to be updated? I have an app that does a few requests at startup. When I enabled redux-persist I started to avoid a request if it was already done at another time. But I have no idea how best to identify whether or not to make the request again to update the data stored by redux-persist. I read about the use of ETags andLast-Modified, but this implies implementing this in the API also right

Caching Apache Ignite, Spring data and mysql does not work together

I have published project with Spring data JPA, Mysql and Apache Ignite configuration. This is Ignite cache configuration @Bean public Ignite igniteInstance() { IgniteConfiguration cfg = new IgniteConfiguration(); // Setting some custom name for the node. cfg.setIgniteInstanceName("springDataNode"); // Enabling peer-class loading feature. cfg.setPeerClassLoadingEnabled(true); // Defining and cr

Caching Ignite Write Behind Internals

I am using Ignite 1.7.0 and was testing the write behind feature of Apache Ignite. The motive of asking this question is to get a better understanding of what is happening behind the scenes when write behind feature is enabled in Apache Ignite. I have a Ignite Client Program which will insert 20 entries into a test cache ( call it "test_cache" ). The Ignite Server is running on the same machine, but on a different JVM. The Ignite Cache has the following configurations setup : Read through,

Caching Yii2 PageCache invalidation

Is there any possibility to invalidate or delete PageCache for a particular action. Consider this: class SiteController extends Controller { public function behaviors() { return [ 'pageCache' => [ 'class' => PageCache::className(), 'duration' => Yii::$app->params['cacheTime'], // seconds 'variations' => [ Yii::$app->language, Yii::$app->request->get('id'),

How to Leverage browser caching URLs?

I'm optimising website and through the checkup it was suggested to leverage browser caching for following links. (15 minutes) (20 minutes) (60 minutes) (2 hours) How do I do that and where?

Caching Is homescreen addition (A2H) ever a signal for browsers to defer PWA cache purging when storage runs low?

When a browser runs low on storage space, I understand that it will start purging the caches of sites (PWAs) starting with the least-recently visited. Per, Using the Cache API in the service worker: You are responsible for implementing how your script (service worker) handles updates to the cache. All updates to items in the cache must be explicitly requested; items will not expire and must be deleted. However, if the amount of cached data exceeds the browser's storage limit, the browser wil

SiteCore Caching

could you please explain what's happening here, i see this entries in my log file but i am unable to make out what's happening. Thanks Hardeep 9160 13:18:33 INFO Cache created: 'master[data]' (max size: 30MB, running total: 82MB) 9160 13:18:33 INFO Cache created: 'master[items]' (max size: 20MB, running total: 102MB) 9160 13:18:33 INFO Cache created: 'master[paths]' (max size: 1MB, running total: 103MB) 9160 13:18:33 INFO Cache created: 'master[standardValues]' (max size: 1MB, running tot

Caching Cache web forms in client side

is it possible to cache form contents on client side? Like maintaining state even if the form is un-saved and the user moves to a new page then returns back to the form?

Caching Create a Google Guava Cache using a complex key

I'm trying to create a Cache that has a "Pair" as its key, with that Pair class taken from this post. I'm trying: CacheLoader<Pair<String, String>, String> loader = new CacheLoader<Pair<String, String>, String>() { public String load(Pair<String, String> key) { return GetRatingIdentityByShortNameLoader(key.first, key.second); } }; _ratingIdCache = CacheBuilder.newBuilder() .concurrencyLevel(a_conclevel.intValue()) .maximum

Backbone.Collection Prefetching & Caching

Are there any recommended libraries, patterns or examples on how to implement Prefetching and/or caching on a Backbone.Collection? For example, I have events I want to display in a calendar that has different view modes (eg. Day, Week, Month). I think it will be better to query the database/API once for say 1-3 months at a time to avoid too many network requests, even if I am in week view. Then I think its beneficial to cache the received data (when the user constantly paginates, it will be fa

Sociallogin not appearing in Drupal when caching with Boost

I'm using the Sociallogin module in Drupal 7 along with the Boost module. The Boost module requires that js/css caching is enabled. The sociallogin widget does not appear either as a user block, social login block or on the user/login page. I've got a cloned dev site happening where js/css caching is disabled and the social login block works fine, so we can probably safely assume that it has to do with the caching. Unfortunately I'm going to need Boost and caching for my production site.

Caching mondrian dimension cache not getting flushed

I am trying to flush the mondrian dimension cache by following code - org.olap4j.metadata.Schema OlapSchema = olapConnection.getOlapSchema(); NamedList<org.olap4j.metadata.Cube> cubeList = OlapSchema.getCubes(); org.olap4j.metadata.Member m = null; for(org.olap4j.metadata.Cube cube: cubeList) { m = cube.lookupMember(IdentifierNode.parseIdentifier( "[Time].[2013].[Jul2013]").getSegmentList()); final CacheControl cacheControl = olapConnection.getCacheControl

Caching Why is ehcache faster than memcache?

Directly quoting from ehcache's website [source]: The idea here is that your caches are set up in a cache hierarchy. Ehcache sits in front and memcacheg behind. Combining the two lets you elegantly work around limitations imposed by Google App Engine. You get the benefits of the speed of Ehcache together with the umlimited size of memcached. Ehcache contains the hooks to easily do this. To update memcached, use a CacheEventListener. To search against memcacheg on a local cache mi

Caching Cache Addressing Methods Confusion

I have been reading about the four ways a cache can be addressed: Physically Indexed Physically Tagged (PIPT) Physically Indexed Virtually Tagged (PIVT) Virtually Indexed Physically Tagged (VIPT) Virtually Indexed Virtually Tagged (VIVT) Which of the following caches would suffer from the synonym and homonym issues? I know that the VIVT would suffer from these issues and PIPT won't. But what about PIVT and VIPT?

Caching Drupal cache not working - tables remain empty

My problem is similar to these, but since I am not allowed to comment, I have to ask again: a) Drupal cache not working (tables empty) b) Drupal cache tables are empty, not receiving data I noticed that after I turned off the Boost module and activated the "normal" Drupal cache, cache tables (starting with cache_ in the database) are remaining empty. I read that this might be related to the use of the Memcache module which I used, too. But disabling that module doesn't change anything either.

Caching What to insert in onInit function

I have a very big cache problem in my app. See this SPA (Single-page app) load always from cache In summary I have a view with an iconTabBar For each tab I have an IconTabFilter fragment in two version: display and change. In onInit function I load all display IconTabFilter fragments and when the user want switch to change mode, he press the button, call removeAllItems; function and load the new set of new

Caching In openJPA, does queryCache require a RemoteCommitProvider?

In openJPA 2.4, if I set : <property name="openjpa.QueryCache" value="true"/> but DO NOT SET openjpa.RemoteCommitProvider property, I get the following error : org.apache.openjpa.util.UserException: You have attempted to use a RemoteCommitListener without also specifying a RemoteCommitProvider. In order to use a remote commit listener, you must configure a remote commit provider to use through the openjpa.RemoteCommitProvider configuration property. This configuration used to work

Caching Cloudfront doesn't clear cache

I have a cloudfront distribution that serve a s3 bucket. When I want to access to the "index.html" through the distribution, I have this header : Age:72145 Cache-Control:max-age=63072000, public Connection:keep-alive Content-Length:3277 Content-Type:text/html; charset=utf-8 Date:Wed, 21 Sep 2016 03:44:37 GMT Expires:Tue, 01 Jan 2030 00:00:00 GMT Last-Modified:Tue, 20 Sep 2016 22:33:21 GMT Server:AmazonS3 Vary:Accept-Encoding Via:1.1 (CloudFront) X

Caching performance for writing the same value again into cache line

I sometimes see optimized code like this: if (matrix[t] != 0) { matrix[t] = 0; } As opposed to just this code: matrix[t] = 0; I suppose this code is written this way to reduce memory bandwidth in the CPU. Is this a good optimization on a typical CPU (when the value is likely to be 0 already) and why? What does this mean for the MESI-state: Is there a state transition from e.g. shared to modified if I write the same value back into a cache line (write but no modification)? Or would thi

Caching Error in Disable browser cache for a Cloud CDN's object (via Google Cloud Storage's bucket)

I have a bucket in Google Cloud Storage, and serving its content via Google Cloud Load Balancing having above bucket as backend. All the objects in the bucket are public. JS, CSS, HTML and images are stored in a bucket. Since Cloud CDN doesn't support gzip compression (afaik) so I have uploaded gzipped files to bucket with appropriate headers.(All my users use browser which supports gzip compression) I want to disable cache(specifically caching in user's browser, but no caching in Google's lb

Caching Monitor cache ECC errors on STM32H7?

I need to know whether ECC errors have been detected on the cache of a STM32H7. I know that ECC errors are always corrected on the cache, even multiple bits errors. According to AN5372 of STMicro: As there is no failure notification or interface to ECC detection results of the CPU cache, the only solution to avoid the rare event of two-bit data cache ECC error is to manually periodically clean or even disable the cache. Flushing the cache periodically prevents the accumulation of more than one

Caching Okta redirect from workbox precache breaking page

I'm working on a PWA that uses a service worker to cache files and a page, I've also included okta for authentication, but every once in a while I'm getting an error that prevents my page from loading, the error says that the page from my cache ("") is trying to redirect to Okta, but this url is not allowed on my Okta due to the WB_REVISION piece. How can I fix this issue? I'm new to all this caching stuff so no clue how to solve this.

  1    2   3   4   5   6  ... 下一页 最后一页 共 23 页