}
-DNSSECKeeper::keyset_t DNSSECKeeper::getKeys(const std::string& zone, boost::tribool allOrKeyOrZone)
+DNSSECKeeper::keyset_t DNSSECKeeper::getKeys(const std::string& zone, boost::tribool allOrKeyOrZone, bool useCache)
{
unsigned int now = time(0);
cleanup();
}
- {
+ if (useCache) {
ReadLock l(&s_keycachelock);
keycache_t::const_iterator iter = s_keycache.find(zone);
}
bool isSecuredZone(const std::string& zone);
- keyset_t getKeys(const std::string& zone, boost::tribool allOrKeyOrZone = boost::indeterminate);
+ keyset_t getKeys(const std::string& zone, boost::tribool allOrKeyOrZone = boost::indeterminate, bool useCache = true);
DNSSECPrivateKey getKeyById(const std::string& zone, unsigned int id);
bool addKey(const std::string& zname, bool keyOrZone, int algorithm=5, int bits=0, bool active=true);
bool addKey(const std::string& zname, const DNSSECPrivateKey& dpk, bool active=true);
if(!dk.isSecuredZone(zonename))
throw ApiException("Zone '"+zonename+"' is not secured");
- DNSSECKeeper::keyset_t keyset=dk.getKeys(zonename);
+ DNSSECKeeper::keyset_t keyset=dk.getKeys(zonename, boost::indeterminate, false);
if (keyset.empty())
throw ApiException("No keys for zone '"+zonename+"'");