Skip to content
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

Put cache operation in another file #1

Open
JokerQyou opened this issue Oct 13, 2014 · 0 comments
Open

Put cache operation in another file #1

JokerQyou opened this issue Oct 13, 2014 · 0 comments

Comments

@JokerQyou
Copy link

First of all, this is just a suggestion.

I have read your docs for this redis cache component of Typecho, but I think your method of putting cache operation in index.php might not be good.
As the official documents requested, each time a Typecho user updates the program, index.php should be replaced with a newer version. And to keep replacing script file after upgrading everytime is neither unnecessary nor convinient.

I think this post might do your project some help: http://lantian.eu.org/article/modify-website/memcache-typecho-acceleration.lantian . The author used a much simpler way to treat cached items, but what I want to show you is this: he put some cache operation (read/get) in config.inc.php, and others (write/put) in theme script files. Since config.inc.php is never changed after the first installation, I think it's a better idea. What's more, by doing so Typecho does not need to connect to the database if the cache exists.

However, it's surely not so wise to perform cache writing in theme scripts, I mus say.

And at last, thank you for your work on caching method for Typecho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant