美元的关键价值,以及允许重写默认的$ cacheFolder的构造使高速缓存。
__construct ( string $key , [ string $cacheFolder = "_cache" ]) RocksCache __构造 ( 字符串 $键 ,[ 字符串 $ cacheFolder =“_cache”])
- $key : the key that will be used to write the cache on disk 字符串 $键 :将用于写入磁盘高速缓存的关键
- $cacheFolder : the location the cached item will be stored 字符串 $ cacheFolder:缓存项的位置将被保存
此功能缓存一个对象传递给它。 它可以处理创建一个新的缓存文件夹。
Cache ( object $data ) 布尔 缓存 ( 对象 数据 )
- $data : this is the object to serialize 反对 美元的数据 :这是要序列化的对象
此功能表示如果存在缓存
CacheExists () ( 布尔 CacheExists)
此功能删除缓存对象
DeleteCache () :布尔 DeleteCache()
这个函数读取缓存的对象
ReadCache () :对象 ReadCache()