NAME
Storage::Abstract::Driver::Memory - In-memory storage of files
SYNOPSIS
my $storage = Storage::Abstract->new(
driver => 'memory',
);
DESCRIPTION
This driver will store entire files in Perl process memory. As such, it is most suitable to use for testing or as a cache of small files.
Using as a snapshot of a directory
If you want to store just a couple of known files faster than direct disk access, you can make use of dynamic readonly
:
$storage->set_readonly(0);
$storage->store('path1', 'file1');
$storage->store('path2', 'file2');
$storage>set_readonly(1);
CUSTOM INTERFACE
Attributes
files
The internal structure (hash) holding the files. It cannot be set via the constructor. It's not recommended to modify it by hand.