feat: Add cache clear api route
This commit is contained in:
@@ -328,6 +328,19 @@ function extractCidFromRecords(records) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clear the cache for a specific domain
|
||||
* @param {string} domain - The Handshake domain to clear from cache
|
||||
*/
|
||||
function clearCache(domain) {
|
||||
if (CACHE_ENABLED) {
|
||||
cache.del(`hns:${domain}`);
|
||||
console.log(`Cache cleared for ${domain}`);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
resolveHandshake
|
||||
resolveHandshake,
|
||||
clearCache
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user