relstorage.cache.local_database – The definition of how local cache databases are manipulated¶
The definition of how local cache databases are manipulated.
This is the bare bones byte-shuffling layer, it defines as little policy as possible (while keeping in mind its purpose.)
The database stores only one state for each object.
This should generally be the latest state found in the cache.
The returned object will iterate
(zoid, was_frozen, state, tid, frequency)from most frequently used and newest, to least frequently used and oldest.
You must completely consume the returned object.
fetch_rows_by_priority, but returns a list instead of cursor.
Take rows in the temporary table and put them in the permanent table, overwriting rows for the same object that are older (based on TID)
If there is a row that is newer, then it is preserved and the temporary row is discarded.
The temporary table will be clear after this.
Returns the total number of rows that were stored into the permanent table.
Given an iterator of
(oid, tid, frozen, state, frequency)values, store them in a temporary table for this session.
Save these checkpoints, if they are newer than the current checkpoints.
The checkpoints in the database, or None if there are none.
A map from OID to its corresponding TID, for all the data in the database.