There are some others interested in documentation efforts for xPDO. Just indicate your interest, sign up for a user account at Jira, and I’ll give you permission to help author documentation in our Confluence wiki project for xPDO. That would be absolutely wonderful.
i have started working with XPDO everything is going well with this great ORB
and in fact i was preparing extended documentation with code examples for XPDO
Simply, whatever you send in as the signature via toCache(). The xPDO class’s getObject*()/getCollection*() methods, as well as any xPDOCriteria-based queries, take care of this for you. xPDO toCache() and fromCache() are intended specifically for caching SQL result sets for consumption in xPDO methods; you may more interested in using an xPDOCache implementation directly, e.g. here is an example from a MODx component I’m working on for paging result sets and caching the pages:
but i struck when i want to retrieve the results from cache
please help me how to retrieve the cached results
i have enabled XPDO_OPT_CACHE_DB=>true
the result set is stored in the cache directory
i understand that we need to use fromcache() call but what is the $signature parameter
i dint understand what value i have to give for this parameter
anybody please give a brief tutorial about how to use cache in XPDO and i will add this in my ext doc so it wil be usefull for other users also
thank you
venu
<?php $cached = false; if (!empty($cachePage)) { $cacheKey = $modx->resource->getCacheKey() . '/' . ($namespace ? $namespace . '/' : '') . $pageVarKey . '/' . $page; $cacheOptions = array( XPDO_OPT_CACHE_KEY => $cachePageKey ,XPDO_OPT_CACHE_HANDLER => $cachePageHandler ); $cached = $modx->cacheManager->get($cacheKey, $cacheOptions); } if (empty($cached) || !is_array($cached)) { // Code to create the data to cache here... $data = doSomethingToGetData(); if (!empty($cachePage)) { $cached = $data; $modx->cacheManager->set($cacheKey, $cached, (integer) $cachePageTTL, $cacheOptions); } }
venu,
and iam registered in jira with venureddy as my username
let me know how can i contribute in the documentation
iam eagerly waiting for modx rev beta version for my next project
i have installed it from SVN but it has some problems with manager interface
when the beta will be out?
thanks again for your quick reply
venu