M
M
Mixail2010-12-07 16:00:41
Perl
Mixail, 2010-12-07 16:00:41

Module for transparent caching of mysql queries in memcached

Does a subject exist as a perl module?
I would like to make queries without thinking that there is a frontend in the form of memcached, and a backend in the form of mysql.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pwlnw, 2010-12-07
@pwlnw

"Transparent caching" is in mysql itself.
It works so well and transparently that you don't even know about it.
The problem arises when you need to invalidate the cache. For example, updating some records. Therefore, the transparent caching you invented will have to repeat the behavior of the mysql cache - delete all queries containing the updated table. So why write what has already been written?
Hence the conclusion: if you want to speed up something even faster than the mysql cache, caching should not be transparent. Each operator must at least indicate the estimated lifetime of the result in the cache.

P
pwlnw, 2010-12-07
@pwlnw

However, try to pick up this script for mysql-proxy: github.com/clofresh/mysql-proxy-cache
of course it caches everything ignoring the application logic.
I don't understand why such a solution might be needed.
Built-in query caching can be controlled explicitly via the SQL_CACHE and SQL_NO_CACHE keywords.

B
bdmalex, 2010-12-07
@bdmalex

Memcached::Client won't work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question