diff options
Diffstat (limited to 'subversion/include/private/svn_cache.h')
-rw-r--r-- | subversion/include/private/svn_cache.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/subversion/include/private/svn_cache.h b/subversion/include/private/svn_cache.h index 166295d6ce90..bedd0a8bfaf0 100644 --- a/subversion/include/private/svn_cache.h +++ b/subversion/include/private/svn_cache.h @@ -356,7 +356,12 @@ svn_cache__membuffer_cache_create(svn_membuffer_t **cache, * * If @a thread_safe is true, and APR is compiled with threads, all * accesses to the cache will be protected with a mutex, if the shared - * @a memcache has also been created with thread_safe flag set. + * @a membuffer has also been created with thread_safe flag set. + * + * If @a short_lived is set, assume that the data stored through this + * cache will probably only be needed for a short period of time. + * Typically, some UUID is used as part of the prefix in that scenario. + * This flag is a mere hint and does not affect functionality. * * These caches do not support svn_cache__iter. */ @@ -369,10 +374,24 @@ svn_cache__create_membuffer_cache(svn_cache__t **cache_p, const char *prefix, apr_uint32_t priority, svn_boolean_t thread_safe, + svn_boolean_t short_lived, apr_pool_t *result_pool, apr_pool_t *scratch_pool); /** + * Creates a null-cache instance in @a *cache_p, allocated from + * @a result_pool. The given @c id is the only data stored in it and can + * be retrieved through svn_cache__get_info(). + * + * The cache object will immediately evict (reject) any data being added + * to it and will always report as empty. + */ +svn_error_t * +svn_cache__create_null(svn_cache__t **cache_p, + const char *id, + apr_pool_t *result_pool); + +/** * Sets @a handler to be @a cache's error handling routine. If any * error is returned from a call to svn_cache__get or svn_cache__set, @a * handler will be called with @a baton and the error, and the |