Implement and document cache-local-dir-write-max-size

This commit is contained in:
Jason Madden 2016-09-20 12:25:06 -05:00
parent 6c3f499373
commit 8107f3f3a7
No known key found for this signature in database
GPG Key ID: 349F84431A08B99E
3 changed files with 19 additions and 0 deletions

View File

@ -441,6 +441,21 @@ cache-local-dir-read-count
.. versionadded:: 2.0b5
cache-local-dir-write-max-size
The *approximate* maximum size of each individual cache file
on disk. When not specified (the default), the maximum file
size will be the same as ``cache-local-mb``.
This is an approximate number because there is some overhead
associated with the storage format that varies based on the
number of entries in the cache.
RelStorage will write to disk, from most important to least
important, the entries in the cache until all the entries are
written or this limit is reached. If you use a size smaller
than ``cache-local-mb``, however, you may miss important
entries that are only used at application startup.
Remote Caching
--------------

View File

@ -86,6 +86,9 @@
<key name="cache-local-dir-compress" datatype="boolean" required="no" default="false">
<description>See the RelStorage README.txt file.</description>
</key>
<key name="cache-local-dir-write-max-size" datatype="byte-size" required="no" default="0">
<description>See the RelStorage README.txt file.</description>
</key>
<key name="cache-local-object-max" datatype="byte-size" required="no">
<description>See the RelStorage README.txt file.</description>
</key>

View File

@ -65,6 +65,7 @@ class ZConfigTests(object):
replica-conf %s
blob-chunk-size 10MB
cache-local-dir-read-count 12
cache-local-dir-write-max-size 10MB
<mysql>
driver auto
db %s