nginx proxy_cache для отдельных запросов

http {
 
proxy_cache_path  /var/cache/nginx/cacheone levels=1:2 keys_zone=cacheone:20m max_size=1024m;
 
...
}
 
server {
 
    ...
 
    set $mykey "";
 
    location ... {
         if ($query_string ~ "(foo.*)")
         {
             set $mykey $1;
             error_page 404  =  @cacheone;
             return 404;
         }
 
        ...
    }
 
    location @cacheone {
        proxy_cache cacheone;
        proxy_cache_key "$request_method|$http_if_modified_since|$http_if_none_match|$mykey";
        proxy_cache_valid 200 301 302 304 7m;

Big nfs_inode_cache

The workaround:

sync
echo 2 > /proc/sys/vm/drop_caches

User tags

php conntrack kernel xhost CPAN oprofile SSD rsync ha htop virt-install nfs4 source iSCSI RT rpm hdparm PTR vim search bscan tin build git storage exim chromium initrd equalizer arp xen scsi cpu sysresccd sublime bug sftp xfs vtysh mariadb vlan bacula tool ulimit opcontrol opreport dstat tftp alsa shellshock gpg quagga soa virtualbox numa bind mdadm su perlbrew graylog2 tzdata ubuntu HTTPS vrrp limit_conn OpenSSL cpanm gre youtube fio Areca alien backup SpamAssassin cgroups keyboard ansible usb elliptics core dump lenny mysql tiger groups corosync fail2ban ddos cache qemu radeon arping raid .htaccess slab replication PXE HDFS bridge top lubuntu qcow2 tar tun APU backtrace dhclient pam iostat idmapd nginx dhcp find noop gdb AMD ipmitool boot munin chroot hotplug iops routing ip nvidia flash OpenStack grub glxinfo mkfs etch video iptables gtk newgrp deb docker apt cpu usage debian raid5 StorMan shorewall wordpress vrrpd taskset DRBD asoundrc perl virsh KVM cluster fido7 squeeze puppet java MegaRAID sysctl language apache parallel ps dns profiling NFS 3Ware SYN lts ardour security erase sysctl.conf docker-compose Adaptec jackd freedos encrypt CentOS dpkg rkhunter drupal LVM sysfs ssh SuperMicro performance firefox xargs proxy lstat route mount pvmove pacemaker sg LSI rtl8723be X forwarding cfq Salt bonding glusterfs Swift ipmi lxc zRam arch pulseaudio iowait bash /etc/network/interfaces wget netfilter openvpn MODx sysrq swap rtsp debootstrap centos 7 exim4 dovecot leap second in-addr.arpa regex