• Kirill Smelkov's avatar
    go/zodb: Prepare to rework/fix LiveCache control · cb6fd5a8
    Kirill Smelkov authored
    We are going to rework LiveCache to support both retaining objects in
    cache even though if all pointers to them went away (currently such
    objects disappear from cache), and to tell the cache that such and such
    object should not be cached at all, e.g. not to evict all other objects
    on one-time large reads.
    
    This will be done by LiveCacheControl giving cache policy classification
    for an object. Prepare for that and change
    
    	WantEvict(obj) -> bool
    
    to
    
    	PCacheClassify(obj) PCachePolicy
    
    which can give more information to LiveCache about how to handle an
    object.
    
    This is only a preparatory patch as there is neither no new
    functionality nor fixes here.
    cb6fd5a8
persistent.go 18.7 KB