fastdo  0.6.8
eientpl::TemplateFileCache类 参考

模板-文件式缓存 更多...

#include <eientpl.hpp>

类 eientpl::TemplateFileCache 继承关系图:
eientpl::TemplateFileCache 的协作图:

Public 成员函数

 TemplateFileCache (time_t lifeTime, winux::String const &cacheDir, winux::String const &cacheExt=".cah")
 构造函数1 更多...
 
virtual bool hasCache (winux::String const &cacheName) const override
 检测是否已经有还有效的缓存,检查其生命期 更多...
 
virtual bool getCacheName (winux::String *cacheName, winux::String const &tplFile, winux::String const &cacheId="") const override
 根据模板文件名和缓存标记id计算缓存名 更多...
 
virtual bool readCache (winux::String const &cacheName, winux::String *str) override
 取得缓存内容字符串 更多...
 
virtual winux::String get (winux::String const &cacheName) const override
 取得缓存内容字符串 更多...
 
virtual bool writeCache (winux::String const &cacheName, winux::String const &str) override
 写入缓存内容字符串 更多...
 
virtual void setLifeTime (time_t lifeTime=0) override
 设置缓存有效时间(即缓存机制是否开启,0为关闭) 更多...
 
virtual time_t getLifeTime () const override
 获取缓存有效时间 更多...
 
void setCacheDirPath (winux::String const &dirPath)
 
winux::String const & getCacheDirPath () const
 
void setCacheExt (winux::String const &extName)
 
winux::String const & getCacheExt () const
 
- Public 成员函数 继承自 eientpl::TemplateCache
virtual ~TemplateCache ()
 

详细描述

模板-文件式缓存

在文件 eientpl.hpp149 行定义.

构造及析构函数说明

eientpl::TemplateFileCache::TemplateFileCache ( time_t  lifeTime,
winux::String const &  cacheDir,
winux::String const &  cacheExt = ".cah" 
)

构造函数1

参数
lifeTime缓存生命期
cacheDir缓存文件目录
cacheExt缓存文件扩展名

成员函数说明

virtual winux::String eientpl::TemplateFileCache::get ( winux::String const &  cacheName) const
overridevirtual

取得缓存内容字符串

实现了 eientpl::TemplateCache.

winux::String const& eientpl::TemplateFileCache::getCacheDirPath ( ) const
inline

在文件 eientpl.hpp169 行定义.

winux::String const& eientpl::TemplateFileCache::getCacheExt ( ) const
inline

在文件 eientpl.hpp172 行定义.

virtual bool eientpl::TemplateFileCache::getCacheName ( winux::String cacheName,
winux::String const &  tplFile,
winux::String const &  cacheId = "" 
) const
overridevirtual

根据模板文件名和缓存标记id计算缓存名

实现了 eientpl::TemplateCache.

virtual time_t eientpl::TemplateFileCache::getLifeTime ( ) const
overridevirtual

获取缓存有效时间

实现了 eientpl::TemplateCache.

virtual bool eientpl::TemplateFileCache::hasCache ( winux::String const &  cacheName) const
overridevirtual

检测是否已经有还有效的缓存,检查其生命期

实现了 eientpl::TemplateCache.

virtual bool eientpl::TemplateFileCache::readCache ( winux::String const &  cacheName,
winux::String str 
)
overridevirtual

取得缓存内容字符串

实现了 eientpl::TemplateCache.

void eientpl::TemplateFileCache::setCacheDirPath ( winux::String const &  dirPath)
void eientpl::TemplateFileCache::setCacheExt ( winux::String const &  extName)
virtual void eientpl::TemplateFileCache::setLifeTime ( time_t  lifeTime = 0)
overridevirtual

设置缓存有效时间(即缓存机制是否开启,0为关闭)

实现了 eientpl::TemplateCache.

virtual bool eientpl::TemplateFileCache::writeCache ( winux::String const &  cacheName,
winux::String const &  str 
)
overridevirtual

写入缓存内容字符串

实现了 eientpl::TemplateCache.


该类的文档由以下文件生成: