NAME

Database::BI::Extract -- SQLite materialisation cache for Database::BI

SYNOPSIS

use Database::BI::Extract;

my $cache = Database::BI::Extract->new(model_dir => '.bi');

# Check cache
my $path = $cache->get($spec, $mtime, $size);
unless ($path) {
    my $bytes = ...; # build the SQLite file
    $path = $cache->put($spec, $mtime, $size, $bytes);
}

DESCRIPTION

Stores SQLite materialisation files (extracts) under model_dir/extracts/. The cache key is an MD5 of the dataset spec, its source mtime, and its size. Deleting the extracts directory leaves the application fully functional.

AUTHOR

Nigel Horne <njh@nigelhorne.com>

LICENCE AND COPYRIGHT

Copyright 2026 Nigel Horne. Usage is subject to the GPL2 licence terms.