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

Spring cache abstraction - distributed environment

I would like to use the spring cache abstraction in my distributed web application. My web application runs on 3 different tomcats with a load balancer. Now, My problem is how exactly can I @Evict cache in all tomcats when another tomcat preforms an…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
12
votes
6 answers

Do You Cache Properties in Local Variables?

Consider the class Foo. public class Foo { private double size; public double getSize() { return this.size; // Always O(1) } } Foo has a property called size, which is frequently accessed, but never modified, by a given method.…
Tom Tucker
  • 11,676
  • 22
  • 89
  • 130
12
votes
1 answer

Joomla progressive cache doesn't handle modules with variable output

I have a module which allows the user to choose a category, which is then used for filtering the component's output. So when the user first clicks on the menu item, the view shows items from all categories, then as they click on the module, a param…
Riccardo Zorn
  • 5,590
  • 1
  • 20
  • 36
12
votes
2 answers

How to use Android's CacheManager?

I'm currently developing an Android application that fetches images using http requests. It would be quite swell if I could cache those images in order to improve to performance and bandwidth use. I came across the CacheManager class in the Android…
punnie
  • 2,404
  • 4
  • 17
  • 32
12
votes
4 answers

How do I Disable the Code Cache for PHP 5 (FPM) with Nginx?

When I save changes to a PHP file and then reload, it continues to execute the old version of the script for a minute or so regardless of how many refreshes I do. After 1 minute (or so) it executes the current version. How do I disable this…
Nick
  • 10,904
  • 10
  • 49
  • 78
12
votes
2 answers

Symfony on Xampp is very slow in development, what can I do?

I have set up Symfony but every page load requires 40 seconds. If I have an empty controller it takes 8 seconds to load. If I start to make some complex queries on the database, it's worse. What can I do? deactivate the profiler? (will this change…
Alexandre
  • 3,088
  • 3
  • 34
  • 53
12
votes
5 answers

SQL Server cache question

When I run a certain stored procedure for the first time it takes about 2 minutes to finish. When I run it for the second time it finished in about 15 seconds. I'm assuming that this is because everything is cached after the first run. Is it…
Abe Miessler
  • 82,532
  • 99
  • 305
  • 486
12
votes
7 answers

Answering HTTP_IF_MODIFIED_SINCE and HTTP_IF_NONE_MATCH in PHP

I have cacheable dynamic content made in PHP 5.1.0+. I already send the correct headers (including Last-Modified and ETag) to clients. I now want my script to be able to answer $_SERVER['HTTP_IF_MODIFIED_SINCE'] and $_SERVER['HTTP_IF_NONE_MATCH']…
AlexV
  • 22,658
  • 18
  • 85
  • 122
12
votes
1 answer

Cache invalidation in ReactiveCocoa

I'm still wrapping my head around RAC and FRP in general - currently struggling to figure out how to implement a pattern I've commonly had to use elsewhere. Let's say I'm making a flashcard app, and the main screen is a list of my decks of cards.…
aehlke
  • 15,225
  • 5
  • 36
  • 45
12
votes
3 answers

Google Chrome Cache PDF files

I have built a small PHP/MySQL internal app to host and sort documents. All works perfectly until it comes to updating a file, in this case a .PDF file. When a user updates the .PDF the new file is on the server as expected and the older version…
twigg
  • 3,753
  • 13
  • 54
  • 96
12
votes
4 answers

Which is most cache friendly?

I am trying to get a good grip on data oriented design and how to program best with the cache in mind. There's basically two scenarios that I cannot quite decide which is better and why - is it better to have a vector of objects, or several vectors…
KaiserJohaan
  • 9,028
  • 20
  • 112
  • 199
12
votes
2 answers

Is there a google API to read cached content?

I know you can go to http://webcache.googleusercontent.com/search?q=cache:http://example.com/ to view Google's cache of any URL, but do they provide an API to hit thousands of these and pay for access? I don't want to just make HTTP GETs to these…
12
votes
1 answer

google charts taking long time to load

i'm using google charts google.load("visualization", "1", {packages:["corechart"]}); but the loading time is very slow upon checking the network usage i found that format+en,default,corechart.I.js is taking approx 6 seconds to load. any work…
12
votes
2 answers

result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off

org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'org.springframework.cache.annotation.AnnotationCacheOperationSource#0': Bean with…
skd
  • 129
  • 1
  • 2
  • 7
12
votes
2 answers

DiskLruCache from android tutorial is missing lots of methods.

Here is the disk cache tutorial I'm following. I've downloaded the source code to DiskLruCache but none of the methods used in this example exist in the source…
Navetz
  • 393
  • 1
  • 2
  • 12