Questions tagged [caching]

A cache is a mechanism for temporarily storing (caching) data locally in order to reduce access time to data stored far away. For CPU/disk/web browsing please use relevant tags (cpu-cache, diskcache,...)

A cache is a mechanism that involves temporarily storing data in places that are faster to access than the original storage location. can be machine code instructions, images, documents, or web pages, for example. The purpose of a cache is to reduce access time, bandwidth usage, server load, and perceived lag.

Different applications where cache mechanisms are used include:

Useful Links

37958 questions
11
votes
2 answers

Cache key construction based on the method name and argument values

I've decided to implement a caching facade in one of our applications - the purpose is to eventually reduce the network overhead and limit the amount of db hits. We are using Castle.Windsor as our IoC Container and we have decided to go with…
MonkeyCoder
  • 2,600
  • 2
  • 28
  • 30
11
votes
6 answers

How to use SDWebImage without any cache for one instance

I use the SDWebImage image downloading/caching library pretty much any time I display an image in a table view. I would usually implement it like so (in a table view cellForRowAtIndexPath method). [cell.imageView setImageWithURL: [NSURL…
Alex Coplan
  • 13,211
  • 19
  • 77
  • 138
11
votes
1 answer

htaccess caching not working

I inputted the following into my ".htacces" file in order to start caching the Web Content. According to Google Page Speed and Yslow the pages are still not Cached. Are the modules wrong? Or is it that the apps are not showing the data…
Joseph
  • 1,734
  • 6
  • 29
  • 51
11
votes
6 answers

Why isn't my javascript & css caching?

It's appears ONLY javascript and css are not caching ... but images are caching. I am using Firebug and when I refresh the page, I notice in Firebug a lot of 200 HTTP responses for js/css but am receiving 304 HTTP codes (content not modified) for…
MrDoAlot
11
votes
3 answers

Disable/Bypass Magento Full Page Cache on single page

How can I disable or bypass FPC for a single page? I don't want to use hole-punching as there are several blocks on the page that I need to be dynamic and I would rather modify one config/class to specify that the entire page should not be cached…
Joe Constant
  • 812
  • 2
  • 13
  • 29
11
votes
2 answers

Caching in JDBC

I want to use caching with JDBC. How can I achieve that? Are there any built-in mechanisms or do I have to use 3rd party solutions? What is best practise for caching with JDBC. Thank You, Jack EDITED: what about…
Jack Mszczynski
  • 221
  • 2
  • 3
  • 7
11
votes
3 answers

Right way to have ASP.NET / IIS NOT cache PDF files

I have the following scenario, and I wanted suggestions on what is the best way to handle this. My web app (ASP.NET 2.0 / IIS 6) generates PDF files, and I have a results page with links to those PDFs. Now, I noticed that if I visit the results…
GR7
  • 5,083
  • 8
  • 48
  • 66
11
votes
2 answers

NUMA aware cache aligned memory allocation

In linux systems, pthreads library provides us a function (posix_memalign) for cache alignment to prevent false sharing. And to choose a specific NUMA node of the arhitecture we can use libnuma library. What I want is something needing both two. I…
Mustafa Zengin
  • 2,885
  • 5
  • 21
  • 24
11
votes
2 answers

Old ActionMailer templates being cached?

We're running a Rails 3.0.7 app with Passenger standalone + nginx and with ruby 1.9.2-p290, and we're seeing the strangest thing happen: After deploying some updates to a mailer template, new mails coming from the app sometimes have the updates…
trisignia
  • 1,173
  • 1
  • 10
  • 19
11
votes
1 answer

What is the meaning of the HTTP header Vary:*

As far as I know, the HTTP Header Vary specifies a comma separated list of HTTP headers that need to be considered by caches together with the URL when deciding if a request is a cache hit or miss. If that header is omitted, means that only the URL…
vtortola
  • 34,709
  • 29
  • 161
  • 263
11
votes
1 answer

Android, Saving and loading a bitmap in cache from different activities

I have i bitmap that needs to show in a new activity, so i cahe it and in the opened activity i try to load it but i get a nullPointerException. Here i save the image : File cacheDir = getBaseContext().getCacheDir(); File f = new File(cacheDir,…
user924941
  • 943
  • 3
  • 12
  • 24
11
votes
7 answers

HTML 5 Appcache works in safari/opera/chrome but not firefox

I have an html5 appcache running on a website, it works fine in Safari, Opera and Chrome but it fails to work on Firefox. I have the following in my code: and the following…
Steve Jones
  • 111
  • 1
  • 3
11
votes
1 answer

Symfony2 dev environment not clearing cache automatically

I'm working on a new Symfony2 project, and I'm using the app_dev frontcontroller to view the default AcmeDemoBundle's pages. When I make changes to the controllers, I get an exception (NotFoundHttpException: No route found for "GET…
Teun van Vegchel
  • 192
  • 1
  • 13
11
votes
1 answer

Invalidate a specific model in the Rails cache

I'm using Rails 3 with Memcached to cache some models. When the model changes, I want to invalidate the cache for that record. With view fragments, I just say expire_fragment("blah"). How do I do this with my models? I don't want to say…
Paul A Jungwirth
  • 23,504
  • 14
  • 74
  • 93
11
votes
5 answers

Removing specific items from Cache (ASP.NET)

I am adding a bunch of items to the ASP.NET cache with a specific prefix. I'd like to be able to iterate over the cache and remove those items. The way I've tried to do it is like so: foreach (DictionaryEntry CachedItem in Cache) { …
Adrian Hope-Bailie
  • 2,445
  • 1
  • 23
  • 26