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

35446 questions
365
votes
7 answers

ETag vs Header Expires

I've looked around but haven't been able to figure out if I should use both an ETag and an Expires Header or one or the other. What I'm trying to do is make sure that my flash files (and other images and what not only get updated when there is a…
GeoffreyF67
  • 10,331
  • 11
  • 39
  • 56
312
votes
19 answers

Force browser to clear cache

Is there a way I can put some code on my page so when someone visits a site, it clears the browser cache, so they can view the changes? Languages used: ASP.NET, VB.NET, and of course HTML, CSS, and jQuery.
Adam
  • 8,334
  • 14
  • 41
  • 57
281
votes
10 answers

Java time-based map/cache with expiring keys

Do any of you know of a Java Map or similar standard data store that automatically purges entries after a given timeout? This means aging, where the old expired entries “age-out” automatically. Preferably in an open source library that is accessible…
Sean Patrick Floyd
  • 274,607
  • 58
  • 445
  • 566
272
votes
24 answers

How to clear the cache of nginx?

I use nginx to as the front server, I have modified the CSS files, but nginx is still serving the old ones. I have tried to restart nginx, to no success and I have Googled, but not found a valid way to clear it. Some articles say we can just delete…
Freewind
  • 177,284
  • 143
  • 381
  • 649
271
votes
9 answers

Is Redis just a cache?

I have been reading some Redis docs and trying the tutorial at http://try.redis-db.com/. So far, I can't see any difference between Redis and caching technologies like Velocity or the Enterprise Library Caching Framework You're effectively just…
Matt Evans
  • 6,601
  • 7
  • 29
  • 60
256
votes
14 answers

How to cache data in a MVC application

I have read lots of information about page caching and partial page caching in a MVC application. However, I would like to know how you would cache data. In my scenario I will be using LINQ to Entities (entity framework). On the first call to…
Coolcoder
  • 3,966
  • 5
  • 25
  • 34
253
votes
17 answers

Angular IE Caching issue for $http

All the ajax calls that are sent from the IE are cached by Angular and I get a 304 response for all the subsequent calls. Although the request is the same, the response is not going be the same in my case. I want to disable this cache. I tried…
Rahul
  • 38,533
  • 23
  • 65
  • 94
250
votes
12 answers

How to Empty Caches and Clean All Targets Xcode 4 and later

Jonathan suggest here: Xcode Includes .xib files that have been deleted! that cleaning all targets and empty the caches will fix the problem with Xcode including deleted .xib files but I cannot find a way to empty the cache in Xcode 4. How to do…
Tieme
  • 53,990
  • 18
  • 90
  • 147
246
votes
14 answers

Stop jQuery .load response from being cached

I have the following code making a GET request on a URL: $('#searchButton').click(function() { $('#inquiry').load('/portal/?f=searchBilling&pid=' + $('#query').val()); }); But the returned result is not always reflected. For…
dragonmantank
  • 14,475
  • 19
  • 80
  • 90
239
votes
9 answers

How do you clear Apache Maven's cache?

Recently, Apache Maven seems to be having caching issues. Performing clean installs on our projects using Windows Vista or Windows 7 sometimes produce artifacts with the same data as a previous build even though the newer artifact's files should…
MetroidFan2002
  • 27,537
  • 16
  • 60
  • 79
212
votes
13 answers

AngularJS disable partial caching on dev machine

I have problem with caching partials in AngularJS. In my HTML page I have:
where my partials are loaded. When I change HTML code in my partial, browser still load old data. Is there any workaround?
Mennion
  • 2,823
  • 3
  • 18
  • 34
211
votes
7 answers

Cache an HTTP 'Get' service response in AngularJS?

I want to be able to create a custom AngularJS service that makes an HTTP 'Get' request when its data object is empty and populates the data object on success. The next time a call is made to this service, I would like to bypass the overhead of…
Gavriguy
  • 3,068
  • 3
  • 17
  • 23
210
votes
5 answers

How can I clear the SQL Server query cache?

I've got a simple query running against SQL Server 2005 SELECT * FROM Table WHERE Col = 'someval' The first time I execute the query can take > 15 secs. Subsequent executes are back in < 1 sec. How can I get SQL Server 2005 not to use any cached…
PaulB
  • 20,984
  • 13
  • 54
  • 75
209
votes
5 answers

What is the difference between HTTP status code 200 (cache) vs status code 304?

I'm using the Google "Page Speed" plug-in for Firefox to access my web site. Some of the components on my page is indicated as HTTP status: 200 200 (cache) 304 By Google's "Page Speed". What I'm confused about is the difference between 200 (cache)…
Hank
  • 2,111
  • 2
  • 13
  • 6
200
votes
8 answers

Disable browser cache for entire ASP.NET website

I am looking for a method to disable the browser cache for an entire ASP.NET MVC Website I found the following method: Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); Response.Cache.SetNoStore(); And also a meta tag method (it…
Palani
  • 8,532
  • 10
  • 51
  • 62