sub get_foo_object { my $foo_id = int(shift); my $obj = $Cache->get("$foo_id"); return $obj if $obj; $obj = $db->selectrow_hashref("SELECT .... FROM foo f, bar b ". "WHERE ... AND f.fooid=$foo_id"); $Cache->set("$foo_id", $obj); return $obj; }
In reply to Re^2: Caching for SQLite
by bash
in thread Caching for SQLite
by bash
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |