Well, if you set cache to expire 30 years from now the browser should honor that, that is if no Last-Modified is set.by kaspars - Nginx Mailing List - English
I have been trying to find a good and standard way of invalidating nginx fastcgi cache. Some time ago we had the fastcgi_cache_bypass filter which was not completely implemented and didn't work (and has been removed from the wiki since). Now the only option seems to be fastcgi_no_cache. Is there a way to cache that fresh response from the backend when fastcgi_no_cache is 1? Like this: 1by kaspars - Nginx Mailing List - English
If your WordPress installation works, WP Minify does too! There is no need for special rewrites.by kaspars - Nginx Mailing List - English
I just wanted to know if there are any updates regarding the corrupted response headers: http://forum.nginx.org/read.php?2,165196,165238#msg-165238 I am trying to use fastcgi_cache_bypass to request a fresh response from the PHP-FPM backend and store it in cache when $http_nocache is set. I can't use fastcgi_no_cache because I want the response to be cached for all future requests when $httby kaspars - Nginx Mailing List - English
There are plenty of example around the web. Search something like "nginx static content expires": Here is one example: http://serverfault.com/questions/23157/setting-expires-headers-for-static-content-served-from-nginxby kaspars - Nginx Mailing List - English
Btw, what kind of cache invalidation are you using, if any? Is it only time based or do you use nginx no_cache and cache_bypass directives (http://wiki.nginx.org/HttpFcgiModule#fastcgi_no_cache) as well?by kaspars - Nginx Mailing List - English
You could add $request_method to your cache_key and this would store those requests in different keys.by kaspars - Nginx Mailing List - English
The problem was indeed caused by the php5-memcache PECL package I had installed from dotdeb (I guess php5-memcache_5.3.5-0.dotdeb.0_i386.deb). So I compiled a fresh one (from http://pecl.php.net/package/memcache) using the official PECL installer and everything is perfect now. Thanks to everyone for helping me figure this out. Kasparsby kaspars - Nginx Mailing List - English
> one year ago i had a similar issue, i switched back to an older php pecl > memcache extension and > it solved my problem. That's interesting, Alexander. I'll give it a try. And thanks to Jim and Dayo for reporting on the output of the page.by kaspars - Nginx Mailing List - English
> Looks like your client stores compressed data in memcached. Check > your client documentation to find out how to switch it off. I already did that -- I'm sure it does not compress data. I just noticed that the problem occurs only for pages with a lot of HTML (6KB), while smaller pages (3KB) are rendered fine. This is nowhere close to the 1MB limit of memcache. For this page http://kby kaspars - Nginx Mailing List - English
Forgot to mention that I'm using Nginx 0.8.54.by kaspars - Nginx Mailing List - English
I have a php script that writes the whole page output (using output buffering and PECL memcache module) to memcache using keys such as: $host$request_uri <?php function memcache_ob($output) { $time_start = microtime(); $cache_ttl = 300; $key = trim($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); $memcache = new Memcache; $memcache->connect('127.0.0.1', 11211);by kaspars - Nginx Mailing List - English
I see that you're using php-cgi with APC. Do you have apc.mmap_file_mask specified in your APC config? Secondly, is there a reason you're not using php-fpm instead of php-cgi? http://stackoverflow.com/questions/598444/how-to-share-apc-cache-between-several-php-processes-when-running-under-fastcgiby kaspars - Nginx Mailing List - English
fastcgi_no_cache $http_cache_bypass; # do no cache at all fastcgi_cache_bypass $http_cache_bypass; # bypass cache <--- Not sure how you get the user's browser to send this header On each page I would have an AJAX call to a very small PHP script that checks for the cache version number and makes a GET (or HEAD) request with Cache-Bypass header if the page needs to be regenerated. The ideaby kaspars - Nginx Mailing List - English
> This is known issue and I believe Igor worked on patching this. > Avoid using different *_cache_bypass/*_no_cache until this is > fixed. Thanks, Maxim! That's good to know.by kaspars - Nginx Mailing List - English
$test will always be equal to 0 as any variable set within the 'if' block is not exposed outside the block AFAIK. No. I am already using this check successfully for the fastcgi_no_cache rule. The real problem is with the *fastcgi_cache_bypass*. My understanding is that if "fastcgi_cache_bypass 1", then Nginx will request a fresh response from the backend and cache that response forby kaspars - Nginx Mailing List - English
> AFAIK, the '$donot_cache ' you set here > will not contain anything outside the if block. You are right, I forgot to put "set $donot_cache = 0;" right before the if block, but it doesn't seem to be the problem. Everything is fine regarding the availability of those variables, and I verified it by adding them as an HTTP header to all responses. > In your case, why noby kaspars - Nginx Mailing List - English
Anyone using fastcgi_cache_bypass with success? I have looked through the changelogs and have not seen it being removed as a feature. The documentation in russian still contains it, while the english wiki does not. Kasparsby kaspars - Nginx Mailing List - English
Using Nginx 0.8.54. I'm trying to use fastcgi_cache_bypass with an HTTP header for Nginx to request a new response from the backend and cache it. if ($http_cookie ~* "comment_author_|wordpress_(?!test_cookie)|wp-postpass_" ) { set $donot_cache 1; } fastcgi_cache cachetitle; fastcgi_cache_key $scheme$host$request_uri; fastcgi_no_cache $donot_cache; # do no cache atby kaspars - Nginx Mailing List - English