-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TODO: Cache logic improvement #111
Comments
A common strategy used on Nginx is using Optionally, since some sites provide different versions for mobile and desktop, a more elaborate strategy is: map $http_user_agent $mobile_request
{
default fullversion;
"~*ipad" fullversion;
"~*android.*mobile" mobileversion;
"~*iphone" mobileversion;
"~*ipod.*mobile" mobileversion;
"~*BlackBerry*Mobile Safari" mobileversion;
"~*BB*Mobile Safari" mobileversion;
"~*Opera.*Mini/7" mobileversion;
"~*IEMobile/10.*Touch" mobileversion;
"~*IEMobile/11.*Touch" mobileversion;
"~*IEMobile/7.0" mobileversion;
"~*IEMobile/9.0" mobileversion;
"~*Firefox.*Mobile" mobileversion;
"~*webOS" mobileversion;
}
fastcgi_cache_key "$scheme$request_method$host$request_uri$mobile_request"; But I do not recommend the later, since most of the time, the page code is the same (and it just uses css rules for responsive design). |
There still exist rooms of improvement in caching logic. But it has been updated by #127 with more secure way of biding cached file and memory pointer. |
Issue solved by merging #127 🎉 |
Thanks Paulo! But I would like to keep this issue open since I think there exist rooms for more improvement in cache logic :-) |
Apache does something like this, by incorporating hostname, protocol, port, path and any CGI arguments to the URL as well as elements defined by the Vary header when creating the hash. With hash as cache key, it’d also be nice to be able to purge individual URLs from command line like htcacheclean does. |
Considering to use unique and distinct UUID as filename even for the same URL at every cache time
The text was updated successfully, but these errors were encountered: