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
12
votes
2 answers

Guava CacheBuilder or MapMaker with Weak/Soft usage

I'm not used to deal with Soft and Weak references in Java but i understand the principle since i'm used to deal with datagrids like Gemfire, which provide overflow to hdd features when memory is full, probably using soft references or something…
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419
12
votes
1 answer

Rails caches_action is skipping before_filters

I have a controller in which I am caching the show action. The show action has a number of before filters for security that are meant to execute and redirect if the user is not logged in, not a member of the current group etc. These before filters…
James P McGrath
  • 1,856
  • 1
  • 20
  • 35
12
votes
6 answers

Firefox 12 not reloading pages after redirect

I have written a login script to redirect back to the index page once you have logged in, and thus reloading the index page for a logged in user, it just displays the previously loaded index page. The new Firefox 12 update doesn't reload the index…
Zoltan
  • 219
  • 2
  • 9
12
votes
2 answers

Scaling and Clustering JPA

I am putting together a regular Java EE application on jboss7 that will use JPA in the data tier. I would like to make this application such that it scales up with load. While it is pretty clear how to scale up the web tier: create more machines and…
Raj
  • 2,852
  • 4
  • 29
  • 48
12
votes
4 answers

read CPU cache contents

Is there any way to read the CPU cache contents? Architecture is for ARM. I m invalidating a range of addresses and then want to make sure whether it is invalidated or not. Although I can do read and write of the range of addresses with and without…
kumar
  • 2,530
  • 6
  • 33
  • 57
12
votes
3 answers

Theory of caching

Is there a unified theory of caching? That is, collections of theorems and algorithms for constructing caches and/or optimizing for them? The question is deliberately broad, because the results I am looking for are also broad. Formulas for maximum…
Jørgen Fogh
  • 7,516
  • 2
  • 36
  • 46
11
votes
3 answers

How to disable Ajax caching?

I am having an issue with ajax caching, This was a problem in IE browser too but i fixed it by Writing the Following code. response.setHeader("Cache-Control", "no-cache"); response.setHeader("expires","-1"); …
pushya
  • 4,338
  • 10
  • 45
  • 54
11
votes
1 answer

In asp.net is there anyway to view whats in httpcontext.Cache?

Possible Duplicate: How can I see what's in my HttpContext.Cache Something funny is happening where things I think are getting cached don't appear to be and expiration doesn't seem to be working as I expect. Is there any admin tool or code…
leora
  • 188,729
  • 360
  • 878
  • 1,366
11
votes
4 answers

Techniques for keeping data in the cache, locality?

For ultra-fast code it essential that we keep locality of reference- keep as much of the data which is closely used together, in CPU cache: http://en.wikipedia.org/wiki/Locality_of_reference What techniques are to achieve this? Could people give…
intrigued_66
  • 16,082
  • 51
  • 118
  • 189
11
votes
3 answers

Clear SSL client certificate state from JavaScript

I'm using client certificates in SSL sessions to authenticate users, but I'm having a bit of a problem with cached sessions. (I have configured IIS to accept—not require—client certificates.) Normal situation: A user accesses the page that asks for…
RicardoSBA
  • 785
  • 1
  • 6
  • 18
11
votes
1 answer

VaryByHeader with OutputCacheAttribute on child actions

With the [OutputCacheAttribute] in ASP.NET MVC 3, you can output cache with a good deal of flexibility. It's useful to leverage the 'VaryByHeader' property to bucket caching by host name. For example: [OutputCache(Duration = 60, VaryByHeader =…
dreadwail
  • 15,098
  • 21
  • 65
  • 96
11
votes
5 answers

Storing C/C++ variables in processor cache instead of system memory

On the Intel x86 platform running Linux, in C/C++, how can I tell the OS and the hardware to store a value (such as a uint32) in L1/L2 cache, and not in system memory? For example, let's say either for security or performance reasons, I don't want…
Steve McMahon
  • 111
  • 1
  • 1
  • 4
11
votes
2 answers

Explain Magento caching system

Could anyone explain about the Magento Caching system & how cache module works in Magento?
Sankar Subburaj
  • 4,992
  • 12
  • 48
  • 79
11
votes
3 answers

OutputCache is sending wrong Vary header when the call hits the cache

I have an action method that I want to cache: [OutputCache(Duration=60*5, Location=OutputCacheLocation.Any, VaryByCustom="index")] public ActionResult Index() { return View(); } With this approach: public override string…
vtortola
  • 34,709
  • 29
  • 161
  • 263
11
votes
1 answer

How to cache & persist the last visited page on a jQuery Mobile application, when re-opened from iPhone homescreen?

I have a simple jQuery Mobile contact-list application. It offers the users an option to add it to their home-screen. When they do, clicking a phone number to start a call and opening the application again puts them to the first page of the app. To…
Ege Özcan
  • 13,971
  • 2
  • 30
  • 51