X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/318d106300102c19d114a4ea89265b0a4060d9cb..fbaf1171b4e343929dd43ecac7cd9d1c692b84ec:/cache.c?ds=sidebyside diff --git a/cache.c b/cache.c index 2e1ef8c..b947a34 100644 --- a/cache.c +++ b/cache.c @@ -99,6 +99,11 @@ int cache_unlock(struct cacheitem *item) return (rename(fmt("%s.lock", item->name), item->name) == 0); } +int cache_cancel_lock(struct cacheitem *item) +{ + return (unlink(fmt("%s.lock", item->name)) == 0); +} + int cache_expired(struct cacheitem *item) { if (item->ttl < 0)