r31247 | glasser | 2008-05-16 18:15:06 -0500 (Fri, 16 May 2008)
On the in-memory-cache branch:
Fulltext caching!
Note: I didn't actually test this with memcached yet; will do so on
Monday. Also, there should probably be a check for maximum size of
cached texts.
* subversion/libsvn_fs_fs/fs.h
(fs_fs_data_t): Add fulltext_cache field.
* subversion/libsvn_fs_fs/caching.c
(svn_fs_fs__initialize_caches): Set up fulltext cache.
* subversion/libsvn_fs_fs/fs_fs.c
(struct rep_read_baton): Add fulltext_cache_key and current_fulltext
fields.
(rep_read_get_baton): Add fulltext_cache_key argument; initialize
current_fulltext.
(rep_read_contents): Append bytes to current_fulltext. If done,
store in cache.
(read_representation): Check cache first. Pass fulltext key to
rep_read_get_baton.
* subversion/include/svn_cache.h
(svn_cache_create_memcache):
* subversion/libsvn_subr/cache-memcache.c
(memcache_set):
The default serialization function now assumes values are
stringbufs, not strings.
* subversion/include/svn_io.h
(svn_stream_from_string): New.
* subversion/libsvn_subr/stream.c
(stringbuf_stream_baton, read_handler_stringbuf,
write_handler_stringbuf): Rename from string_stream_baton,
read_handler_string, and write_handler_string.
(string_stream_baton, read_handler_string, svn_stream_from_string):
New.
Patch by: dberlin (concept)
dchristian (concept)
me