Documentation
¶
Index ¶
- type AppCacheItem
- type CacheDriver
- func (c *CacheDriver) Close() error
- func (c *CacheDriver) Expire(ctx context.Context, id string) error
- func (c *CacheDriver) Get(ctx context.Context, id string) (interface{}, error)
- func (c *CacheDriver) GetAppCache(ctx context.Context, projectID string) (*models.ApplicationCache, error)
- func (c *CacheDriver) GetProject(ctx context.Context, projectID string) (*models.Project, error)
- func (c *CacheDriver) ListKeys(ctx context.Context) ([]string, error)
- func (c *CacheDriver) Put(ctx context.Context, id string, cache interface{}) error
- func (c *CacheDriver) PutAppCache(ctx context.Context, projectID string, cache *models.ApplicationCache) error
- func (c *CacheDriver) SaveProject(ctx context.Context, project *models.Project) (*models.Project, error)
- type CacheExpiration
- type CacheItem
- type ProjectItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppCacheItem ¶
type AppCacheItem struct {
ID string `json:"id"`
Cache *models.ApplicationCache `json:"cache"`
}
AppCacheItem represents an application cache entry
type CacheDriver ¶
CacheDriver implements CacheDBInterface using ApitoBolt
func GetBoltCacheDriver ¶
func GetBoltCacheDriver(cfg *models.Config) (*CacheDriver, error)
func (*CacheDriver) Expire ¶
func (c *CacheDriver) Expire(ctx context.Context, id string) error
Expire removes a key from cache and its related data
func (*CacheDriver) Get ¶
func (c *CacheDriver) Get(ctx context.Context, id string) (interface{}, error)
Get retrieves a value from the cache
func (*CacheDriver) GetAppCache ¶
func (c *CacheDriver) GetAppCache(ctx context.Context, projectID string) (*models.ApplicationCache, error)
GetAppCache retrieves application cache for a project
func (*CacheDriver) GetProject ¶
GetProject retrieves a project from cache
func (*CacheDriver) ListKeys ¶
func (c *CacheDriver) ListKeys(ctx context.Context) ([]string, error)
ListKeys returns all keys in the cache
func (*CacheDriver) Put ¶
func (c *CacheDriver) Put(ctx context.Context, id string, cache interface{}) error
Put stores a value in the cache with optional TTL
func (*CacheDriver) PutAppCache ¶
func (c *CacheDriver) PutAppCache(ctx context.Context, projectID string, cache *models.ApplicationCache) error
PutAppCache stores application cache for a project
func (*CacheDriver) SaveProject ¶
func (c *CacheDriver) SaveProject(ctx context.Context, project *models.Project) (*models.Project, error)
SaveProject stores a project in cache
type CacheExpiration ¶
CacheExpiration represents an expiration entry
type CacheItem ¶
type CacheItem struct {
ID string `json:"id"`
Data interface{} `json:"data"`
}
CacheItem represents a generic cache item
type ProjectItem ¶
ProjectItem represents a project cache entry
Click to show internal directories.
Click to hide internal directories.