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

Ignore files that have already been committed to a Git repository

I have an already initialized Git repository that I added a .gitignore file to. How can I refresh the file index so the files I want ignored get ignored?
  • 46,549
  • 11
  • 40
  • 46
7 answers

Flash CS4 refuses to let go

I have a Flash project, and it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought we were ready - I thought it was time. The new…
  • 27,153
  • 7
  • 30
  • 34
29 answers

How do we control web page caching, across all browsers?

Our investigations have shown us that not all browsers respect the HTTP cache directives in a uniform manner. For security reasons we do not want certain pages in our application to be cached, ever, by the web browser. This must work for at least…
Edward Wilde
  • 25,967
  • 8
  • 55
  • 64
34 answers

Disabling Chrome cache for website development

I am modifying a site's appearance (CSS modifications) but can't see the result on Chrome because of annoying persistent cache. I tried Shift+refresh but it doesn't work. How can I disable the cache temporarily or refresh the page in some way that I…
  • 22,950
  • 16
  • 43
  • 67
17 answers

Memcached vs. Redis?

We're using a Ruby web-app with Redis server for caching. Is there a point to test Memcached instead? What will give us better performance? Any pros or cons between Redis and Memcached? Points to consider: Read/write speed. Memory usage. Disk I/O…
Sagiv Ofek
  • 25,190
  • 8
  • 60
  • 55
57 answers

How to force browsers to reload cached CSS and JS files?

I have noticed that some browsers (in particular, Firefox and Opera) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files, but the user's browser…
  • 107,154
  • 87
  • 232
  • 265
25 answers

Is Safari on iOS 6 caching $.ajax results?

Since the upgrade to iOS 6, we are seeing Safari's web view take the liberty of caching $.ajax calls. This is in the context of a PhoneGap application so it is using the Safari WebView. Our $.ajax calls are POST methods and we have cache set to…
  • 8,569
  • 3
  • 13
  • 6
11 answers

What is __pycache__?

From what I understand, a cache is an encrypted file of similar files. What do we do with the __pycache__ folder? Is it what we give to people instead of our source code? Is it just my input data? This folder keeps getting created, what it is for?
  • 10,577
  • 3
  • 14
  • 6
10 answers

What is a "cache-friendly" code?

What is the difference between "cache unfriendly code" and the "cache friendly" code? How can I make sure I write cache-efficient code?
Noah Roth
  • 9,060
  • 5
  • 19
  • 25
9 answers

What's the difference between Cache-Control: max-age=0 and no-cache?

The header Cache-Control: max-age=0 implies that the content is considered stale (and must be re-fetched) immediately, which is in effect the same thing as Cache-Control: no-cache.
  • 7,752
  • 3
  • 19
  • 15
9 answers

Read whole ASCII file into C++ std::string

I need to read a whole file into memory and place it in a C++ std::string. If I were to read it into a char[], the answer would be very simple: std::ifstream t; int length;"file.txt"); // open input file t.seekg(0, std::ios::end); //…
  • 40,844
  • 23
  • 87
  • 135
30 answers

How can I force clients to refresh JavaScript files?

We are currently working in a private beta and so are still in the process of making fairly rapid changes, although obviously as usage is starting to ramp up, we will be slowing down this process. That being said, one issue we are running into is…
  • 8,850
  • 5
  • 22
  • 14
16 answers

How to clear gradle cache?

I'm trying to use Android Studio, and the first time I boot it up, it takes like 45 MINUTES to compile... If I don't quit the application, it is okay - each subsequent compilation/running the app will take around 45 seconds. I've tried to check some…
David T.
  • 22,301
  • 23
  • 71
  • 123
6 answers

Is there a tag to turn off caching in all browsers?

I read that when you don't have access to the web server's headers you can turn off the cache using: But I also read that this doesn't work in some versions of IE. Are there any set of
  • 25,510
  • 39
  • 140
  • 297
6 answers

What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?

Is there a standard for what actions F5 and Ctrl+F5 trigger in web browsers? I once did experiment in IE6 and Firefox 2.x. The F5 refresh would trigger a HTTP request sent to the server with an If-Modified-Since header, while Ctrl+F5 would not have…
Morgan Cheng
  • 73,950
  • 66
  • 171
  • 230
2 3
99 100