Commit 5c46bf8e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9817744d
...@@ -152,17 +152,28 @@ const ( ...@@ -152,17 +152,28 @@ const (
// state eviction until discard is really needed. // state eviction until discard is really needed.
PCachePinObject PCachePolicy = 1 << iota PCachePinObject PCachePolicy = 1 << iota
// don't discard object state. // don't keep object in the cache.
//
// The object will be discarded from the cache completely as soon as it
// is semantically valid to do so.
PCacheDiscardObject
PCacheOmitObject
// keep object state in the cache.
//
// Object's state is kept XXX ...
// Note: object can go awai (PCachePinObject)
// //
// Note: on invalidation, state of invalidated objects is discarded // Note: on invalidation, state of invalidated objects is discarded
// unconditionally. // unconditionally.
PCacheKeepState PCacheKeepState
// data access is non-temporal. // don't keep object state.
// //
// Object's state is used once and then won't be used for a long time. // Data access is non-temporal. Object's state is used once and then
// Don't pollute cache with state of this object. // won't be used for a long time. Don't pollute cache with state of
PCacheNonTemporal // XXX PCacheForgetState? DropState? // this object.
PCacheOmitState
) )
// ---------------------------------------- // ----------------------------------------
......
...@@ -264,8 +264,6 @@ func (obj *Persistent) PDeactivate() { ...@@ -264,8 +264,6 @@ func (obj *Persistent) PDeactivate() {
var cp PCachePolicy var cp PCachePolicy
if cc := obj.jar.cache.control; cc != nil { if cc := obj.jar.cache.control; cc != nil {
// XXX catch inconsistency in PCacheClassify result
// XXX locking for .control ?
cp = cc.PCacheClassify(obj.instance) cp = cc.PCacheClassify(obj.instance)
} }
......
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