diff options
| author | Philipp Tanlak <philipp.tanlak@gmail.com> | 2024-11-24 23:16:31 +0100 |
|---|---|---|
| committer | Philipp Tanlak <philipp.tanlak@gmail.com> | 2024-11-24 23:16:31 +0100 |
| commit | 175cb0700b86134d3b04eab23d100dce2c3b6d56 (patch) | |
| tree | a48b69aafeaf4a8690fba9b3d0bbe4ac9e64ecf3 /modules/cache/cache.go | |
| parent | 653be4548b0883532665997a4624e56fdf7c02a6 (diff) | |
Change cache backend from sqlite to bbolt
Diffstat (limited to 'modules/cache/cache.go')
| -rw-r--r-- | modules/cache/cache.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/cache/cache.go b/modules/cache/cache.go index 401aa49..7164506 100644 --- a/modules/cache/cache.go +++ b/modules/cache/cache.go @@ -34,15 +34,12 @@ func (Module) ModuleInfo() flyscrape.ModuleInfo { func (m *Module) Provision(ctx flyscrape.Context) { switch { - case m.Cache == "memory": - m.store = NewMemStore() - case m.Cache == "file": file := replaceExt(ctx.ScriptName(), ".cache") - m.store = NewSQLiteStore(file) + m.store = NewBoltStore(file) case strings.HasPrefix(m.Cache, "file:"): - m.store = NewSQLiteStore(strings.TrimPrefix(m.Cache, "file:")) + m.store = NewBoltStore(strings.TrimPrefix(m.Cache, "file:")) } } |