We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Cache in Database is really bad?

I've read in several places say the database cache is not recommended, do you share this opinion? or sometimes it is good to use the cache in the database.



85.5k

by database you mean mysql ? probably very bad :D , makes no sence to search for anythiong inb that cache ?

https://redis.io/



40.1k
Accepted
answer
edited Sep '16

Database Cache is good when there is no other cache

see: https://www.percona.com/blog/2006/08/09/cache-performance-comparison/



85.5k
edited Sep '16

yes ofc ... Peter Zaitsev | August 9, 2006 ....

and key,value for mysql is

    $key="test";
    $data="MyTestString";

which doesnt many any sence ? you probably need text field, which is not very hight speed. Also you need to delete/edit those caches also... i dont see a benchmark of that.

I really dont see how mysql can beat memcache or redis.. i mean people use memcache to speed up mysql ...



85.5k

Query Cache and cache in database are 2 complatly diffent things btw :-)

i guess i miss understood you

Yes, Database Cache != Query Cache.

Claramente se equivoco al escribir 'database cache' y puso 'query cache'.

Well mysql has builtin result query cache. If you will make any query then result of it will be saved to cache, if you will make another query it will be got from cache.

HOWEVER, ANY CHANGES to table will result in invalidate of all cache keys.