-
Notifications
You must be signed in to change notification settings - Fork 11
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
Memcache support, initially for tweets #211
Memcache support, initially for tweets #211
Conversation
This could be expanded to support: servers.php and stream.php. Work is part of SteamLUG#208
a13c7c9
to
3f2af6b
Compare
When access to memcache is offline, fetchOrStore will still return the result of the function call; this makes the code more readable and prevents copy/paste errors for the false branch. This mirrors the behaviour added for the servers memcache update. This does remove error reporting for memcache calls… because otherwise passing in false here would produce errors in log for every visit.
The expiration times I picked are 10 minutes for server data, 20 minutes for tweets. Thinking at least for the server page, we should make the viewer aware content is stale with an ‘updated * ago’ |
This PR works. memcached and php5-memcache (not php5-memcached doh) are installed and active on the server. git fetch origin refs/pull/211/head:pr211
git checkout pr211 And deleted it afterwards again: git checkout master
git branch -D pr211 Ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ok.
Lemme just check a few things, however watching Eurovision so it may take some minutes. |
A not very scientific comparison to say having this enabled is useful. /news
/servers
|
Going to merge this in this state, stream work is not done but due to #212 we probably need to do some rethinking of that page before we do further work on it… |
This could be expanded to support: servers.php and stream.php.
Work is part of #208 to reduce our initial load time to visit the site, as the server stalls for a moment querying this API.
Requires server to have memcached installed, configured, and have our local creds.php updated to include:
getMCHost()
+getMCPort()