redman Reply #1, 4 years, 1 month ago
hi,
i'm considering running memcache daemon on a site, so i'm just trying to get my head around caching objects. i've got a few questions:
are there any examples of this in the 0.9.7 code or anywhere else i can have a look at?
cheers
i'm considering running memcache daemon on a site, so i'm just trying to get my head around caching objects. i've got a few questions:
-
[list]
- do i have to manually add things to the cache with xpdo->toCache() and xpdo->fromCache(), or do i only need to specify cache time-to-live values as part of xpdo->getObject()?
- do i need to initialise the cache manager first? From the docs i can see that xpdo->$_cacheEnabled is false by default - how do i enable caching? do i just set $xpdo->$_cacheEnabled = true?
- i can see the xpdo->getCacheManager method, but how could i override it with my own that inherits from xpdoCacheManager? to enable use of memcache do i just have to set $xpdo->config['cache_db_handler'] to Memcache?
are there any examples of this in the 0.9.7 code or anywhere else i can have a look at?
cheers
