Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachManager ¶
AttachManager attach cache manager to the database, and return it. dir is root directory for storing files for cache. mem is number of levels of tree items to store in the memory. file is number of levels of tree items to store in files. stores is number of stores to cache.
func EnableAccountNodeCacheByForce ¶ added in v0.9.7
EnableAccountNodeCacheByForce enable AccountNodeCache ignoring default setting. Default setting for account node cache is specified by call in AttachManager.
func NewNodeCacheList ¶ added in v0.9.10
Types ¶
type BranchCache ¶ added in v0.9.10
type BranchCache struct {
// contains filtered or unexported fields
}
func NewBranchCache ¶ added in v0.9.10
func NewBranchCache(depth int, fdepth int, path string) *BranchCache
func (*BranchCache) Get ¶ added in v0.9.10
func (c *BranchCache) Get(nibs []byte, h []byte) ([]byte, bool)
func (*BranchCache) OnAttach ¶ added in v0.9.10
func (c *BranchCache) OnAttach(id []byte) cacheImpl
func (*BranchCache) Put ¶ added in v0.9.10
func (c *BranchCache) Put(nibs []byte, h []byte, serialized []byte)
func (*BranchCache) String ¶ added in v0.9.10
func (c *BranchCache) String() string
type FullCache ¶ added in v0.9.10
type FullCache struct {
// contains filtered or unexported fields
}
func NewFullCache ¶ added in v0.9.10
func NewFullCache() *FullCache
func NewFullCacheFromBranch ¶ added in v0.9.10
func NewFullCacheFromBranch(bc *BranchCache) *FullCache
type NodeCache ¶
type NodeCache struct {
// contains filtered or unexported fields
}
func AccountNodeCacheOf ¶
AccountNodeCacheOf get node cache of the account specified by *id*. If node cache for the account is not enabled, it returns nil.
func WorldNodeCacheOf ¶
WorldNodeCacheOf get node cache of the world if it has. If node cache for world state is not enabled, it returns nil.