NAME
FusqlFS::Cache::File - FusqlFS file backed cache strategy implementation
SYNOPSIS
use FusqlFS::Cache::File;
our %cache;
tie %cache, 'FusqlFS::Cache::File', 2048;
DESCRIPTION
This is file backed cache strategy implementation. This class is not to be used directly.
This cache strategy accepts single `threshold' parameter which must be an integer greater than zero and determines minimum file system entry size to be stored in file.
The idea behind this cache strategy is simple: it stores file records with size greater than given threshold in real files on disk. This cache method processes simple plain files and pseudopipes only, directories and symlinks are always stored in memory, which is not that bad as they are usually quite small in comparison to plain files and psuedopipes output cache.
Disk cache is situated in /tmp/fusqlfs-$PID.cache, where $PID
is substituted with current fusqlfs daemon's pid. This directory should be removed after fusqlfs is unmounted, if it doesn't, you can remove it by yourself and report me a bug (unless daemon was finished in some unusual way like power failure, system crash or kill -9
, as it had not any way to cleanup its garbage in such a case).
This cache strategy is good if you are going to mount database with a lot number of records with large blob or text fields in it, as it focuses on per records cache optimization. If you need to keep memory usage low and have a database with a really lot number of quite small records you can consider using FusqlFS::Cache::Limited strategy instead.
SEE ALSO
FusqlFS::Cache and FusqlFS::Cache::Base about FusqlFS cache strategies.
FusqlFS::Entry for file system entry structure description.
perltie about object tie()ing in perl.
NAME
FusqlFS::Cache::File::Record - file cache strategy backend class
SYNOPSIS
use FusqlFS::Cache::File::Record;
my $value;
tie $value, 'FusqlFS::Cache::File::Record', '/tmp/value-storage.tmp';
DESCRIPTION
This class is scalar tie()-able class, which stores tied scalar in a file on disk. This is a backend class for FusqlFS::Cache::File used to store single entry value in a file. This class is not to be used by itself.
Please see FusqlFS::Cache::File for full description about `file' cache strategy and everything related to it.