-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Enable Memcached fallback for non-nginx #141
Comments
Just one note to your benchmarks (I assume you are running them with code from master branch). I made a similar benchmarks for HDD cache before I submitted #98 and there's been little improvement until #93 has been merged. In other words, current stable version of Cachify does not benefit from these fallbacks that much, because cache is printed in I'm mentioning it, cause I realized that printing cache early (ie. change introduced in #93) is not backwards compatible in some scenarios (see #138), so I guess we should decide first, whether we keep it like it is, try to minimize possible back-compat issues in some way or revert the change completely.
This is quite important I'd say. I haven't done it for HDD cache yet, cause there's no straightforward solution. |
Absolutely right, thanks for the reminder. Of course my tests are based on the development state (not on a production site, but a staging version), I'm not going to optimize legacy code.
Actually there is one now. With the |
You mean adding an extra comment after closing html tag? Something like: </html>
<!-- Cachify: cache file served via PHP --> This could work :) |
I was wondering about why the
print_cache()
methods for the memory backends have been left empty instead of doing something useful like .. let's say print the cache... Thememcached->get()
is called anyway a couple of lines earlier, but the result is just ignored. Can't imagine any reason for that. (shouldn't be queried if not used).I ran a couple of tests on a real-world site, enabled memcached without the nginx config and added a few lines to the backend. Processing time dropped from ~180ms to ~60ms using Memcached through PHP (~65ms for DB cache), so I think it's worth enabling this for users not able to reconfigure their server or not using nginx at all.
Of course the server module performs far better than taking the loop through PHP and this should be the preferred way. The setup information can still be displayed if using nginx with a note on performance.
Makes debugging a little harder, so maybe one could add a hint in the HTML comment (if detailed signature is enabled) to point out which path is actually used.
I started working on this in my fork to ge a smooth solution. So if we decide to add this in future releases (not in 2.3.0 I believe), it should be about ready for testing.
Open for discussion.
The text was updated successfully, but these errors were encountered: