美元的關鍵價值,以及允許重寫默認的$ 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()