Filesystem caching
The local filesystem cache engine provides the simplest, no-fuss option for
setting up Blingalytics. It stores report caches in a file using SQLite, which
is included in Python.
While the ease of use is great, the SQLite solution presents a number of
limitations:
- Poor concurrency support. While you can have multiple clients reading from
a SQLite database, any write connection requires a lock on the entire
database. If you have more than one end user, use Redis caching
instead.
- Poor network access. It’s technically possible to set up remote access to
your SQLite databse, but it’s really not recommended. So if you wanted to
have multiple machines accessing the cache, use Redis caching
instead.
You’ve been warned. Great for dev, poor for everything else.
-
class blingalytics.caches.local_cache.LocalCache(database='/tmp/blingalytics_cache')
Caches the files locally on the filesystem. Takes just one optional
argument:
- database: This is the file where the cache database will be created.
Defaults to /tmp/blingalytics_cache. Note that this cache will not
work with SQLite’s in-memory database option.