in reply to SharedMemoryCache: How does it really work?
The way shared memory works is that all CODE segments are loaded into SHM, not DATA which usually goes on the stack. By sharing CODE segments, your programs can reuse parts of the memory store where there's no change in the code. If you wanted to store DATA in SHM, you'd need to do something custom to UNIX and need gigs of RAM.
Either that or write something to alloc all the memory ahead of time....
It sort of bummed me out a bit, however I'm now taking the opportunity to write a persistant cache module.
Yup, I know there is already a Cache::SharedFileCache, however I figure I might use this opportunity to hone my OOP skills (which arent very good).
My module wont be very complicated, and will use a RDBMS for the store, and only have a couple of methods, namely memorise, new, and remember.
Comments welcome..
|
|---|