On 07.03.2011 23:40, Daniel Shahaf wrote:
stef...@apache.org wrote on Mon, Mar 07, 2011 at 22:28:25 -0000:
Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1078990&r1=1078989&r2=1078990&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Mon Mar 7 22:28:25 2011
@@ -227,5 +227,28 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
SVN_ERR(svn_cache__set_error_handler(ffd->txdelta_window_cache,
warn_on_cache_errors, fs, pool));
+ /* initialize node revision cache, if caching has been enabled */
+ if (svn_fs__get_global_membuffer_cache())
+ {
+ SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->node_revision_cache),
+
svn_fs__get_global_membuffer_cache(),
+
svn_fs_fs__serialize_node_revision,
+
svn_fs_fs__deserialize_node_revision,
+ APR_HASH_KEY_STRING,
+ apr_pstrcat(pool,
+ prefix,
+ "NODEREVS",
+ NULL),
+ fs->pool));
+ }
/me wonders if we should maintain somewhere a list of all the "cache key"
namespaces...
(i.e., should someone else use the "fsfs:$uuid:NODEREVS" prefix, the end
results won't be nice :-[ )
It wouldn't, indeed. However, all these prefixes are being constructed,
i.e. implicitly listed, in the svn_fs_fs__initialize_caches function.
So, unless somebody else calls svn_cache__create_membuffer_cache
the risk of key space collisions is minimal.
-- Stefan^2.