Skip to content

Instantly share code, notes, and snippets.

@cnsaturn
cnsaturn / query_cache.php
Created August 12, 2011 14:44
On-demand data retrieval between memcached and mysql in Codeigniter
/**
*
* query_cache
*
* 查询缓存,返回数据集。如果缓存不存在或系统不支持缓存,则直接从model中提取。
*
*
* @param string $key Key of the cache item
* @param string $model Model name from which we retrieve data
* @param string $method Method name of such model