mysql - Real world uses of memcached for a website -


i trying implement memcached website.

i have image gallery images changed (deleted etc). kept in database.

now know cache result set returned mysql, , there every time request view gallery made checks cache see if exists, , serves instead of hitting database again , again.

my question is, how using memcached better mysql's query cache, since both serve memory?

also, storing html string things website header , footer in memcached give slight performance increase? assume mean server doesn't need load data disk.

mysql query cache has 2 big limitations when comes using effective object level caching system.

  1. the cache table invalidated whenever table updated (e.g. update, insert or delete).

  2. query cache cannot exist across different instances if running around scale query cache offers little benefit.

another point of note (that might obvious some) query cache caches results of deterministic queries - using date functions or similar result in there being database hit.

imo, main use case of memcached offers memory object caching scale application. fact simple deploy makes wonderful deploy cache data layer.

in specific case not seem warrant use of memcached, specify data not change much; , not seem me there scope scaling beyond using more 1 db server.

for far more thorough list of limitations , characteristics of mysql query cache check out.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -