Questions tagged [cache]
A location or process for storing of transitory or temporary data in order to improve application or system performance.
103
questions
6
votes
3
answers
18k
views
What is the memory module on a RAID card needed for?
As above, what is the reason for needing a memory module on a RAID card?
The card I am looking at (HP P410) comes with either 256MB or 512MB but unsure which to get and why.
6
votes
2
answers
9k
views
Non-volatile cache RAID controllers: what kind of protection is there against NVCACHE failure?
The battery back-up (BBU) model:
admin enables write-back cache with BBU
writes are cached to the RAID controller's RAM (major performance benefit)
the battery saves uncommitted and cached data in ...
93
votes
16
answers
71k
views
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 ...
17
votes
1
answer
7k
views
deleting linux cached ram [duplicate]
I have a webserver that has 8GB of ram and is running a pretty intensive php site (1 site) that does file manipulation, graphing, emailing, forums, you name it. The environment is far from static ...
97
votes
18
answers
91k
views
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 ...
4
votes
1
answer
5k
views
Two separate PHP-FPM sites seem to be using the same code?
I have two websites with two codebases, yet when I change one codebase, I see the change in both.
I have two checkouts of the same website. They are set up to use PHP-FPM through Apache2 with FastCGI....
2
votes
1
answer
1k
views
Varnish cache with Nginx SSL termination
How can I use varnish cache with nginx SSL termination for my SSL-Only (Https only) website? I use ubuntu 18.04 and I am currently running a wordpress site on my server.
21
votes
5
answers
15k
views
Is there a way to get Cache Hit/Miss ratios for block devices in Linux?
Is it possible to see in Linux how many read and write requests from user space end up causing cache hits and misses for block devices?
15
votes
6
answers
13k
views
SATA Disks that handle write caching properly?
It's pretty common to see advice to disable the write cache on individual disks used for databases because otherwise some disks will acknowledge writes that haven't yet made it to the disk surface.
...
122
votes
8
answers
418k
views
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 ...
97
votes
5
answers
111k
views
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 ...
30
votes
7
answers
152k
views
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 ...
26
votes
2
answers
20k
views
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-...
24
votes
2
answers
35k
views
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 ...
23
votes
4
answers
18k
views
How effective is LSI CacheCade SSD storage tiering?
LSI offers their CacheCade storage tiering technology, which allows SSD devices to be used as read and write caches to augment traditional RAID arrays.
Other vendors have adopted similar technologies;...
11
votes
5
answers
18k
views
How do I add no-cache headers to all 404 pages served by apache and nginx?
I have recently run into an issue after switching to Cloudflare, and the solution is to basically stop Cloudflare from caching 404 responses.
In our load-balanced multi-server setup, occasional 404s ...
10
votes
2
answers
5k
views
Caching proxy for yum and debian repositories
Does a caching proxy for yum exist, similar to approx for Debian repositories?
Is there a way to have reprepro behave the same as approx? I have heard that approx was not as stable; besides, I would ...
7
votes
2
answers
25k
views
How can I cache YouTube videos with Squid Cache?
we're using the Squid cache in our company. Is there any way we can cache YouTube videos?
cheers :)
7
votes
2
answers
3k
views
Apache's htcacheclean doesn't scale: How to tame a huge Apache disk_cache?
We have an Apache setup with a huge disk_cache (>500.000 entries, >50 GB disk space used).
The cache grows by 16 GB every day.
My problem is that the cache seems to be growing nearly as fast as it's ...
7
votes
5
answers
8k
views
Free / Cached / Available memory on Linux
I have read that linux uses free memory for caching, to make system faster. However, both Nagios and Paessler PRTG monitoring system show me that my memory usage is critical.
I could change Nagios ...
4
votes
2
answers
26k
views
Linux cached memory: Over 85% of cached memory and using swap
I read about Linux and cachd memory at linuxatemyram but there is something that doesn't make sense to me, if the server have even a low load, instead of freeing some cached memory it starts using ...
3
votes
1
answer
1k
views
Why does TTL sometimes re-increment between DNS queries?
I dig xkcd.com, and I get something like this back:
; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> xkcd.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: ...
3
votes
2
answers
309
views
Is there an Elegant solution to rewrite long image?query-urls into cachable_nice_urls, using only apache htaccess?
this is a pain in the ass-problem! Whicever genius solves this riddle will receive paypal donation to eat diner for two. Now lets get started. Given: most proxies, do not cache resources with a "?" in ...
3
votes
2
answers
1k
views
Unexplained cache RAM drops on Linux machine
I run a CentOS 5.7 64 machine with 24gb ram and running kernel 2.6.18-274.12.1.el5.
This machine runs only Nginx, php-fpm and Xcache as extra applications.
Since about 3 weeks my memory behavior on ...
2
votes
1
answer
2k
views
NGINX cache (same URL) first returns MISS to all Chrome, Curl and Wget
I have a nginx cache proxy that gets content from an apache origin server.
I make requests from curl, wget and Chrome to verify the cache response. Problem is that, for same URL, I always get a MISS ...
2
votes
2
answers
147
views
linux caches route with IPs of machine it has no access to
I have a VPN with a gateway, and an application server.
The app server only knows about the gateway of the VPN. The gateway of the VPN knows about the gateway of the physical network the vms are ...
1
vote
2
answers
1k
views
running nginx as a reverse proxy with apache
Q1) Do I need mod_deflate running on apache? does it help in performance in anyway?
Q2) Do I need mod_cache running on apache if nginx is serving a static caching proxy?
<IfModule mod_cache.c>
...
0
votes
2
answers
8k
views
How to update domain password cache over vpn
I have a machine that connects to a domain over a VPN, however it hasn't connected for months and has an old domain password (that I have forgotten) cached on it and won't let me log in to the box ...
0
votes
2
answers
962
views
Adding location-block to cache files makes those files return 404
I want to cache some static files using Nginx. But I somehow can't get it to work.
This is my nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*....
43
votes
6
answers
38k
views
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 ...
34
votes
2
answers
41k
views
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 ...
28
votes
4
answers
142k
views
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 ...
18
votes
2
answers
41k
views
Nginx not caching data
I have a REST API behind an nginx proxy. Proxying works fine, however I am unable to cache any responses. Any help would be much appreciated:
Nginx config:
worker_processes 10;
error_log logs/...
13
votes
6
answers
45k
views
sssd and ldap authentication cache
On our box running OpenSUSE 12.2 we have installed OpenLDAP and sssd daemon. We are using these two services for user authentication. Recently we created a script which creates new web-users for our ...
13
votes
5
answers
25k
views
Does it matter in which order rules are placed in htaccess?
I hope this is a simple YES or NO answer (please specify why)
Q1: Does it matter in which order rules are placed in htaccess?
Especially when they are completely separated items.
Q2: If yes, am I ...
12
votes
5
answers
30k
views
How to configure nginx to serve static contents from RAM?
I want to set up Nginx as my web server. I want to have image files cached in the memory (RAM) rather than disk. I am serving a small page and want a few images always served from RAM. I don't wish to ...
12
votes
5
answers
21k
views
Is there a way to force windows to cache a file in RAM
I have a windows server 2008 R2 file server, that has some large files that on rare occasions is very important to get copied to another system as quickly as possible.
Is there a way to force these ...
11
votes
2
answers
32k
views
bind9 does not resolve dnssec correctly
I have a problem with my dns server setup. My bind server is mainly a cache-server but does also serve some internal domains. It listens only on my private network and serves only requests from there.
...
11
votes
3
answers
12k
views
Why does Apache send 200 OK while Last-modified matches If-modified-since?
I'm trying to have a basic behavior regarding my caching strategy: files should be cached, and revalidated with server each time. So I would like Apache to send a 304 back.
Here is the dialog that ...
11
votes
1
answer
19k
views
How to add response headers with HAproxy 1.6 based on request URI?
I use HAproxy 1.6 as load balancer in front of tomcat servers.
I need to add response headers based on the request URI.
For e.g., I'd like to add the response header Cache-Control public,max-age="...
9
votes
4
answers
12k
views
Cloudflare not caching static files as expected (cf-cache-status: MISS)
I'm wondering why Cloulflare would not cache a certain static js file.
Given the reuqest:
curl -I http://www.testlifeinuk.com/dist/lifeinuk.js
the headers returned like:
HTTP/1.1 200 OK
Date: Mon, ...
9
votes
5
answers
6k
views
Squid or Other HTTP Caches with SSD Cache Store?
I'm contemplating setting up a squid (or possibly varnish) cache on a system with SSD drives.
The obvious benefit is that these systems have great READ speeds and I expect my hit ratios to be fairly ...
8
votes
2
answers
19k
views
Setting up a reverse proxy to cache images
I wrote a quick Python server to serve resampled images. For example, a URL might look something like http://images.domain.com/resample/100x100/9f362e1994264321.jpg. Being that resampling images is ...
7
votes
1
answer
6k
views
Working Nginx fastcgi_cache php-fpm cache and static file caching configuration?
Nginx wiki is very vague with explanation as to how to properly setup nginx with php-fpm with fastcgi_caching for sites which have cookies i.e. wordpress, drupal, vbulletin etc.
I downloaded a ...
6
votes
2
answers
8k
views
How to make Varnish ignore, not delete cookies
I want to use Varnish to cache certain pages even in the presence of cookies. There are 3 possibilities that I need to take care of:
An anonymous user is viewing some page
A logged in user is viewing ...
6
votes
4
answers
8k
views
ZFS - enable or disable disk cache?
I'm setting up ZFS (through FreeNAS) with RAIDZ1 on a server with 4 x WD Red SATA HDDs (connected through a PERC H330 in HBA mode).
The server is hooked to a UPS.
For ZFS and in this setup, does it ...
6
votes
4
answers
12k
views
Caching OpenLDAP credentials for offline use on laptops
Our clients (Ubuntu 14.04) can login with there LDAP login.
As soon as they have no network they cannot login with LDAP.
Is there a way to cache those passwords and usernames,
so that the laptops ...
6
votes
3
answers
6k
views
Making SATA disk write cache safe
Supposedly (see, e.g., a question about it here), with NCQ enabled drives, the drive write cache is supposed to be safe, as in it doesn't lie to the OS about data being committed to the platters when ...
6
votes
2
answers
6k
views
What is the difference between proxy_cache_ and fastcgi_cache?
I was searching for a simple Nginx microcache solution and I end up seeing two ways to have microcache. Some tutorials use proxy_cache, while others fastcgi_cache. What are the differences, pros and ...
5
votes
1
answer
3k
views
Why is the ssl session cache ( ssl_session_cache) disabled by default in nginx?
In nginx, the ssl_session_cache directive has a default of 'none'. ref
However, in the documentation for configuring HTTPS server, it's advised to turn on the ssl session cache, as it explains that ...