This commit is contained in:
20
rediska/cache/BaseItemMetadata.hpp
vendored
Normal file
20
rediska/cache/BaseItemMetadata.hpp
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "rediska/common/types.hpp"
|
||||
|
||||
namespace cache {
|
||||
class BaseItemMetadata {
|
||||
public:
|
||||
BaseItemMetadata(TTL ttl);
|
||||
|
||||
void updateTTL(TTL ttl);
|
||||
|
||||
void resetExpirationTime();
|
||||
|
||||
bool isExpired() const;
|
||||
|
||||
private:
|
||||
TTL ttl_;
|
||||
Timestamp expirationTime_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user