27 if ( this->_cacheLifeTime < 1 )
36 time_t cacheFileMTime = this->_cacheItems.at(cacheName).timeStamp;
49 return this->_cacheItems.at(cacheName);
58 item = &this->_cacheItems[cacheName];
60 item->
mime = std::move(mime);
61 item->
content = std::move(content);
68 this->_cacheLifeTime = lifeTime;
73 return this->_cacheLifeTime;
76 time_t _cacheLifeTime;
77 CacheItemsMap _cacheItems;
time_t getLifeTime() const
StaticFileMemoryCache(time_t lifeTime=0)
bool hasCache(winux::String const &cacheName) const
缓冲区,表示内存中一块二进制数据(利用malloc/realloc进行内存分配)
time_t GetUtcTime(void)
获取UTC时间秒数,或者调用CRT的time(NULL)
std::map< winux::String, CacheItem > CacheItemsMap
bool isset(_MAP const &m, _KEY const &k)
检测map中是否有该键的值
CacheItem & writeCache(winux::String const &cacheName, winux::String mime, winux::Buffer content)
void setLifeTime(time_t lifeTime=0)