Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Lazy Vars is a simple utility module meant to help development on other modules.
It helps store and retrieve arbitrary persistent variables from the database. It is similar to the Core 'variable' system except that it loads the variables on demand and doesn't load them unnecessarily.
It provides a simple API for the common get, set and delete operations
LazyVars::set('my_module_settings', array(1, 2, 3));
$settings = LazyVars::get('my_module_settings', NULL);
LazyVars::del('my_module_settings');
and it also provides an interface so that other modules can implement their own storage back-ends.
interface LazyVarsInterface {
public static function set($name, $var, $cache = FALSE);
public static function get($name, $default = NULL, $cache = TRUE);
public static function del($name);
}
Project information
- Maintenance fixes only
Considered feature-complete by its maintainers. - 11 sites report using this module
- By VladRM on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.