A location or process for storing of transitory or temporary data in order to improve application or system performance.
Questions tagged [cache]
1605 questions
127
votes
8 answers
How do I clear Chrome's SSL cache?
I have a HAProxy / stunnel server that handles SSL for our sites on AWS. During testing, I created a self-signed cert on this server and hit it from my desktop using Chrome to test that stunnel was working correctly.
Now I have installed the…
Foovanadil
- 1,370
103
votes
18 answers
Caching/preloading files on Linux into RAM
I have a rather old server that has 4GB of RAM and it is pretty much serving the same files all day, but it is doing so from the hard drive while 3GBs of RAM are "free".
Anyone who has ever tried running a ram-drive can witness that It's awesome in…
Andrioid
- 2,760
97
votes
5 answers
Disable caching when serving static files with Nginx (for development)
We are using Nginx to serve static files on a development platform. As it is a development platform, we'd like to disable caching so that each change is propagated to the server. The configuration of the VHost is quite simple:
server {
server_name…
Olivier Chappe
- 971
95
votes
16 answers
Why drop caches in Linux?
In our servers we have a habit of dropping caches at midnight.
sync; echo 3 > /proc/sys/vm/drop_caches
When I run the code it seems to free up lots of RAM, but do I really need to do that. Isn't free RAM a waste?
ivcode
- 1,092
- 1
- 9
- 13
46
votes
4 answers
How do I remove a specific bad plan from the SQL Server query cache?
We have one particular SQL Server 2008 query (not a stored proc, but the same SQL string -- executes every 5 minutes) that intermittently caches a very bad query plan.
This query normally runs in a few milliseconds, but with this bad query plan, it…
Jeff Atwood
- 13,264
43
votes
6 answers
Which PHP (opcode) cache one should use and why?
I keep hearing about some PHP (opcode) caches like - APC, XCache, Memcache, eAccelerator, etc.
But I couldn't ever figure out how to go about choosing one. Apart from performance benefit, which a caching system is supposed to deliver, which other…
rahul286
- 1,667
35
votes
2 answers
No Cache-Control Header for files from AWS CloudFront with S3 Origin
We just migrated to Amazon AWS. We currently have an EC2 instance that's working well. It's running Nginx in front and Apache in the back-end. That's running well also. All sites are launched properly and includes the Cache-Control header for files…
jarvis
- 2,036
32
votes
8 answers
How do I force NGINX to load new static files?
I recently pushed a major update to a site and I'm having an issue where some people can't log in because their browser is loading old javascript files. Some of the things I have done include:
Cache busting all javascript files
Set sendfile off in…
jwerre
- 798
31
votes
3 answers
What effect does https traffic have on web cache proxy servers?
I just took two university courses on computer security and internet programming. I was thinking about this the other day:
Web cache proxy servers cache popular content from servers on the web. This is useful, for example, if your company has a 1…
ejsuncy
- 413
- 1
- 5
- 7
28
votes
5 answers
Does CURL cache requests?
This is a pretty long question, so bear with me.
I wanted to stress my Akamai Server logged in from an AWS instance. So, I started running ab benchmark. However, they seemed ridiculously fast to download ~3 MB video files. Naturally I wanted to see…
28
votes
4 answers
How do I disable tomcat caching? I'm having weird static file problems
How do I prevent tomcat from caching? I have css and basic html files that I load and use via ajax, and unless I restart tomcat, the changes do not seem to reflect. Different machines, different browsers, and I don't receive the updated…
Stefan Kendall
- 1,079
27
votes
2 answers
Linux SSD as HDD cache
I have a Linux server system installed on an SSD and an HDD for user data. As there is space left on the SSD, I want to use it as a read cache for the HDD.
Looking at the possibilities, I found:
dm-cache: Needs a lot of reads before caching shows…
GxB
- 441
25
votes
2 answers
For L2ARC and ZIL: is it better to have one large SSD for both, or two smaller SSDs?
Main references
ZFS L2ARC (Brendan Gregg) (2008-07-22) and ZFS and the Hybrid Storage Concept (Anatol Studler's Blog) (2008-11-11) include the following diagram:
Question
Should I interpret the vertical white line – at the SSDs layer – as a…
Graham Perrin
- 633
25
votes
2 answers
Varnish Cache - default TTL?
I have discovered that I can set the TTL in Varnish as follows in my VCL file:
sub vcl_fetch {
# 1 minute
set obj.ttl = 1m;
}
But what is the default setting (assuming the backend server is setting no cache-control header) ?
Ade
- 741
24
votes
3 answers
When to use or not to use sendfile on/off in Nginx?
We have this setting in our nginx.conf for quite a while.
sendfile on;
When we have updated a file e.g. /js/main.js and access from browser https://test.com/js/main.js?newrandomtimestamp, it will still load the older version unless we do a full…
forestclown
- 1,015