Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How does cache work?

Name: Anonymous 2012-12-23 6:24

I mean, from the perspective of the program at hand. Is it just a bunch variables that you load data too from your DB or what?

I know there are libraries like memcached that take care of this. How do they cache stuff?

Name: Anonymous 2012-12-23 8:07

>>1
How a cache is implemented is context dependant. Conceptually a cache is just some place where you store stuff you frequently access. Memcache , redis etc. implement a cache by storing values in the RAM. Fetching from RAM is faster.  Since the number of objects you store in a cache less than all the data put together, look up is faster. In the case of memcache or redis, they are an alternative to traditional Databases where all data is stored in the hard disk.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List