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
6 answers

How do I force rails to not use a cached result for has_many through relations?

I have the following three models (massively simplified): class A < ActiveRecord::Base has_many :bs has_many :cs, :through => :bs end class B < ActiveRecord::Base belongs_to :a has_many :cs end class C < ActiveRecord::Base belongs_to…
Oliver
  • 191
  • 1
  • 1
  • 8
12
votes
3 answers

Android - Bitmap cache takes a lot of memory

I'm new to all the memory management subject, so there are a lot of things I don't understand. I'm trying to cache an image in my app, but I'm having troubles with its memory consumption: All of the Bitmap Chaching code is pretty much copy-pasted…
Ori Wasserman
  • 962
  • 1
  • 10
  • 24
12
votes
2 answers

Azure-hosted ASP.NET MVC site drops client cache-related HTTP headers

We have recently begun moving some of our ASP.NET MVC websites from our own managed environment to Azure. One of the issues we have seen is that client side caching does not seem to be working properly when delivering dynamically created content.…
wolfyuk
  • 746
  • 1
  • 8
  • 26
12
votes
2 answers

Server is serving old versions of static files, but trimmed or padded to match length of new versions

The symptoms of my problem match this question pretty much exactly: Changed static files are cropped/padded to the new size and served the old - Fedora Whenever I make changes to my static files (e.g. .js and .css), those changes don't show up in…
Cam Jackson
  • 11,860
  • 8
  • 45
  • 78
12
votes
1 answer

Google Volley - when to use Cache.remove and Cache.invalidate

I am integrating Volley into a project and came across the standard [We have items in the Cache, but want to allow the User to refresh anyway] Scenario Now Google Volley provides 2 ways to clear an item from the…
Makibo
  • 1,679
  • 21
  • 31
12
votes
2 answers

Distributed cache - basic concepts

I am trying to understand the basic concepts of the distributed cache and its usage. Firstly, is the distributed cache a cluster of machines, who together act as one, big cache for all the clients, or do clients keep their local cache and one…
Bober02
  • 15,034
  • 31
  • 92
  • 178
12
votes
4 answers

JavaScript: how to force Image() not to use the browser cache?

If I load the nextimg URL manually in the browser, it gives a new picture every time I reload. But this bit of code shows the same image every iteration of draw(). How can I force myimg not to be cached?
Mark Harrison
  • 297,451
  • 125
  • 333
  • 465
12
votes
1 answer

Django rest framework cache policy

I'm googling a lot to find out what Django Rest Framework can do with Cache. Since now, all I got was this page http://django-rest-framework.org/api-guide/throttling.html telling me nothing about their policy. My needs with the API are simple: keep…
Isaac
  • 299
  • 3
  • 15
12
votes
3 answers

Symfony 2 cache clearing issue

My Symfony 2 website has recently been giving me problems when I try to clear the cache. I type the following command in the terminal: php app/console cache:clear --env=dev And get the following error: [ErrorException] …
richelliot
  • 588
  • 2
  • 10
  • 30
12
votes
6 answers

Caching architecture for search results in an ASP.NET application

What is a good design for caching the results of an expensive search in an ASP.NET system? Any ideas would be welcomed ... particularly those that don't require inventing a complex infrastructure of our own. Here are some general requirements…
LBushkin
  • 129,300
  • 32
  • 216
  • 265
12
votes
6 answers

Prevent cache in CloudFlare

I'm getting started with CloudFlare and I’m using it to build a new project. I’m facing an issue when I make changes: I cannot see my changes in the browser, so I assume the problem here is the cache setting of CloudFlare. I have read this link,…
Tomás Juárez
  • 1,517
  • 3
  • 21
  • 51
12
votes
1 answer

What does it mean that ConcurrentLinkedHashMap has been integrated into Guava?

We use ConcurrentLinkedHashMap from https://code.google.com/p/concurrentlinkedhashmap/ in a project and I saw a note that it was integrated into Guava's MapMaker and CacheBuilder back in 2010. The info is very brief: Integration of the algorithmic…
Bogdan Calmac
  • 7,993
  • 6
  • 51
  • 64
12
votes
3 answers

Does larger cache size always lead to improved performance?

Since cache inside the processor increases the instruction execution speed. I'm wondering what if we increase the size of cache to many MBs like 1 GB. Is it possible? If it is will increasing the cache size always result in increased performance?
Taha Taha
  • 131
  • 1
  • 2
  • 6
12
votes
5 answers

Android WebView not loading second page from cache

I have an Android app that simply houses a website. I would like the app to cache the pages of the website for offline use. I'm doing a simple test to see if the cache is working but unfortunately it is failing to load a page i have previously…
turtleboy
  • 8,210
  • 27
  • 100
  • 199
12
votes
1 answer

Caching Github API calls

I have a general question related to caching of API calls, in this instance calls to the Github API. Let's say I have a page in my app that shows the filenames of a repo, and the content of the README. This means that I will have to do a few API…
Ronze
  • 1,544
  • 2
  • 18
  • 33