Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(string) (CacheItem, error) Set(string, CacheItem) error Hits() int64 Misses() int64 Evictions() int64 Size() int64 Close() error }
func NewFSCache ¶
func NewGoCache ¶
func NewGoCache(opts *GoCacheOptions) (Cache, error)
func NewSQLiteCache ¶
func NewSQLiteCache(db *database.SQLiteDatabase) (Cache, error)
type CacheItem ¶
type CacheItem interface { SPR() spr.StandardPlacesResult Polygons() []geojson.Polygon Geometry() pip.GeoJSONGeometry }
func NewFeatureCache ¶
type FSCache ¶
type FSCache struct { Cache Logger *log.WOFLogger // contains filtered or unexported fields }
type FeatureCache ¶
type FeatureCache struct { CacheItem `json:",omitempty"` FeatureSPR spr.StandardPlacesResult `json:"spr"` FeaturePolygons []geojson.Polygon `json:"polygons"` }
func (*FeatureCache) Geometry ¶
func (fc *FeatureCache) Geometry() pip.GeoJSONGeometry
func (*FeatureCache) Polygons ¶
func (fc *FeatureCache) Polygons() []geojson.Polygon
func (*FeatureCache) SPR ¶
func (fc *FeatureCache) SPR() spr.StandardPlacesResult
type GoCache ¶
type GoCache struct { Cache Logger *log.WOFLogger Options *GoCacheOptions // contains filtered or unexported fields }
type GoCacheOptions ¶
type GoCacheOptions struct { CacheSize int CacheTrigger int DefaultExpiration time.Duration CleanupInterval time.Duration }
func DefaultGoCacheOptions ¶
func DefaultGoCacheOptions() (*GoCacheOptions, error)
func (*GoCacheOptions) String ¶
func (o *GoCacheOptions) String() string
type SQLiteCache ¶
type SQLiteCache struct { Cache Logger *log.WOFLogger // contains filtered or unexported fields }
func (*SQLiteCache) Close ¶
func (c *SQLiteCache) Close() error
func (*SQLiteCache) Evictions ¶
func (c *SQLiteCache) Evictions() int64
func (*SQLiteCache) Hits ¶
func (c *SQLiteCache) Hits() int64
func (*SQLiteCache) Misses ¶
func (c *SQLiteCache) Misses() int64
func (*SQLiteCache) Size ¶
func (c *SQLiteCache) Size() int64
Click to show internal directories.
Click to hide internal directories.