diff options
Diffstat (limited to 'src/util/disk_cache.h')
-rw-r--r-- | src/util/disk_cache.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h index b7c0df25dd1..63ab9b35e2c 100644 --- a/src/util/disk_cache.h +++ b/src/util/disk_cache.h @@ -104,7 +104,7 @@ disk_cache_destroy(struct disk_cache *cache); * Remove the item in the cache under the name \key. */ void -disk_cache_remove(struct disk_cache *cache, cache_key key); +disk_cache_remove(struct disk_cache *cache, const cache_key key); /** * Store an item in the cache under the name \key. @@ -116,7 +116,7 @@ disk_cache_remove(struct disk_cache *cache, cache_key key); * evicted from the cache. */ void -disk_cache_put(struct disk_cache *cache, cache_key key, +disk_cache_put(struct disk_cache *cache, const cache_key key, const void *data, size_t size); /** @@ -133,7 +133,7 @@ disk_cache_put(struct disk_cache *cache, cache_key key, * caller should call free() it when finished. */ void * -disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size); +disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size); /** * Store the name \key within the cache, (without any associated data). @@ -145,7 +145,7 @@ disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size); * evicted from the cache. */ void -disk_cache_put_key(struct disk_cache *cache, cache_key key); +disk_cache_put_key(struct disk_cache *cache, const cache_key key); /** * Test whether the name \key was previously recorded in the cache. @@ -158,7 +158,7 @@ disk_cache_put_key(struct disk_cache *cache, cache_key key); * disk_cache_has_key() to return true for the same key. */ bool -disk_cache_has_key(struct disk_cache *cache, cache_key key); +disk_cache_has_key(struct disk_cache *cache, const cache_key key); #else @@ -174,32 +174,32 @@ disk_cache_destroy(struct disk_cache *cache) { } static inline void -disk_cache_put(struct disk_cache *cache, cache_key key, +disk_cache_put(struct disk_cache *cache, const cache_key key, const void *data, size_t size) { return; } static inline void -disk_cache_remove(struct disk_cache *cache, cache_key key) +disk_cache_remove(struct disk_cache *cache, const cache_key key) { return; } static inline uint8_t * -disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size) +disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size) { return NULL; } static inline void -disk_cache_put_key(struct disk_cache *cache, cache_key key) +disk_cache_put_key(struct disk_cache *cache, const cache_key key) { return; } static inline bool -disk_cache_has_key(struct disk_cache *cache, cache_key key) +disk_cache_has_key(struct disk_cache *cache, const cache_key key) { return false; } |