24 #ifndef NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
25 #define NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
27 #include "../common.hpp"
29 #include "../util/scheduler.hpp"
45 const time::seconds& defaultTtl = time::seconds(3600));
53 virtual shared_ptr<const v1::IdentityCertificate>
64 insert(shared_ptr<const v1::IdentityCertificate> certificate);
67 remove(
const Name& certificateName);
73 typedef std::map<Name, std::pair<shared_ptr<const v1::IdentityCertificate>, EventId> >
Cache;
77 boost::asio::io_service&
m_io;
87 #endif // NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
Copyright (c) 2013-2016 Regents of the University of California.
CertificateCacheTtl(boost::asio::io_service &io, const time::seconds &defaultTtl=time::seconds(3600))
std::map< Name, std::pair< shared_ptr< const v1::IdentityCertificate >, EventId > > Cache
virtual void insertCertificate(shared_ptr< const v1::IdentityCertificate > certificate)
Cache of validated certificates with freshness-based eviction policy.
boost::asio::io_service & m_io
virtual ~CertificateCacheTtl()
Name abstraction to represent an absolute name.
virtual shared_ptr< const v1::IdentityCertificate > getCertificate(const Name &certificateNameWithoutVersion)
Interface for the cache of validated certificates.
time::seconds m_defaultTtl