Commit ab12d320 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c2a36e9c
......@@ -545,9 +545,9 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic
switch obj.(type) {
// ZBlk* should be in cache but without data
case *ZBlk0:
return zodb.PCachePinObject | zodb.PCacheNonTemporal
return zodb.PCachePinObject | zodb.PCacheOmitState
case *ZBlk1:
return zodb.PCachePinObject | zodb.PCacheNonTemporal
return zodb.PCachePinObject | zodb.PCacheOmitState
// ZBigFile btree index should be in cache with data
case *btree.LOBTree:
......@@ -557,7 +557,7 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic
// don't let ZData to pollute the cache
case *ZData:
return zodb.PCacheNonTemporal
return zodb.PCacheOmitObject | zodb.PCacheOmitState
// for performance reason we also keep ZBigFile in cache.
//
......
......@@ -44,7 +44,7 @@ func TestZBlk(t *testing.T) {
X := exc.Raiseif
assert := require.New(t)
ctx := context.Background()
stor, err := zodb.OpenStorage(ctx, "testdata/zblk.fs", &zodb.OpenOptions{ReadOnly: true}); X(err)
stor, err := zodb.Open(ctx, "testdata/zblk.fs", &zodb.OpenOptions{ReadOnly: true}); X(err)
db := zodb.NewDB(stor)
defer func() {
err := db.Close(); X(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment