Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultContentFile = "content.txt"
DefaultContentFile contains the name of the file where to store processed content
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Store the item to the cache with provided content Store(item Item, content []byte) error // IsPageCached checks whether the page is in the cache IsPageCached(nm ItemNamespace) bool // IsItemCached checks whether the item is in the cache // Deprecated: use IsPageCached instead IsItemCached(item Item) bool // GetContent returns the content for the item GetContent(item Item) []byte // Invalidate the cache content Invalidate(sel models.RunSelector) }
Cache interface
type Item ¶
type Item struct { // Namespace of the item Namespace ItemNamespace // FileName of the file that will be/is stored in the cache FileName string // CachePolicy for the item - it can be nocache CachePolicy string }
Item represents an unique item stored in the cache
type ItemNamespace ¶
ItemNamespace contains tuple Category/Page
func NewNamespace ¶
func NewNamespace(cat string, page string) ItemNamespace
NewNamespace creates a instance of the new ItemNamespace
func (ItemNamespace) Path ¶
func (n ItemNamespace) Path() string
Path returns the path representation of the namespace (OS specific)
func (ItemNamespace) String ¶
func (n ItemNamespace) String() string
String returns the string representation of the namespace
type NamespacePath ¶
type NamespacePath interface { // Path return the path of the item Path() string }
NamespacePath defines a generic interface for each type to have method to return the namespace path
Click to show internal directories.
Click to hide internal directories.