Document the new row_cache option.

This commit is contained in:
hofmockel 2015-08-30 12:22:36 +02:00
parent 01f13577ad
commit cfa5ff5e9b
2 changed files with 12 additions and 4 deletions

View file

@ -716,7 +716,14 @@ Options object
3. ``If compare(k1, k2) <= 0, then compare(prefix(k1), prefix(k2)) <= 0`` 3. ``If compare(k1, k2) <= 0, then compare(prefix(k1), prefix(k2)) <= 0``
4. ``prefix(prefix(key)) == prefix(key)`` 4. ``prefix(prefix(key)) == prefix(key)``
*Default:* ``None`` *Default:* ``None``
.. py:attribute:: row_cache
A global cache for table-level rows. If ``None`` this cache is not used.
Otherwise it must be an instance of :py:class:`rocksdb.LRUCache`
*Default:* ``None``
CompressionTypes CompressionTypes
@ -765,9 +772,9 @@ LRUCache
.. py:method:: __init__(capacity, shard_bits=None) .. py:method:: __init__(capacity, shard_bits=None)
Create a new cache with a fixed size capacity. The cache is sharded Create a new cache with a fixed size capacity (in bytes).
to 2^numShardBits shards, by hash of the key. The total capacity The cache is sharded to 2^numShardBits shards, by hash of the key.
is divided and evenly assigned to each shard. The total capacity is divided and evenly assigned to each shard.
.. _table_factories_label: .. _table_factories_label:

View file

@ -5,6 +5,7 @@ Version 0.4
----------- -----------
* Added :py:func:`repair_db`. * Added :py:func:`repair_db`.
* Added :py:meth:`rocksdb.Options.row_cache`
Backward Incompatible Changes: Backward Incompatible Changes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^