Skip to content

Method cache_ensure

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: cache_ensure()

Turkce Dokumantasyon | English Documentation

Category: Cache & Buffer Methods
Submodule: AmberDB::Cache
Entry Type: Cache Population Verification


1. Definition and Overview

cache_ensure() ensures that the RAM-disk cache for a table configured with strict mirroring (use_cache => 2) is populated and valid. If the cache file is missing or expired, it automatically triggers cache_preload().


2. Syntax and Signature

my $cache_path = $adb->cache_ensure($table_id);

3. Practical Code Example

my $cached_table_path = $adb->cache_ensure("catalog_category");

4. See Also

AmberDB Encyclopedia

Home · A-Z Index


Getting Started & Guides


Core Concepts


Core CRUD Methods


Query, Search & Facets


Transactions & Locks


Cache, Buffer & Low-Level


Locale & Helpers


Maintenance & Tools


Configuration Flags


File Formats


Language

Clone this wiki locally