微擎开发------day04

时间:2022-04-08 19:08:14

(1) cache_write($key,$data)  按照指定键名缓存数据

cache_write('test', $data)

(2) cache_load($key)  读取指定键名的缓存数据

cache_write('test',$data)

$result   = cache_load('test')

(3) cache_delete($key)  删除指定的缓存

cache_write('test',$data)

cache_delete('test', $data)

(4) cache_clean()

清空所有的缓存,但是在项目里面应该使用不到

有关缓存的配置

微擎系统支持三种缓存(mysql , memcache , file)

$config['setting']['memcache']['server']    =

$config['setting']['memcache']['port']    =

$config['setting']['memcache']['pconnect']    =

$config['setting']['memcache']['timeout']    =

$config['setting']['memcache']['session']    =