My first reflex if you use a list with ids would be to use a hash instead, the keys being the id and the values the data. To purge an item just do a delete $cache->{$id}.
If you want to add a time stamp or something so that you can purge the cache every now and then you then either need another hash (id => weight, time or whatever criteria you will use) or store an array [criteria, data] in each value.
In reply to Re: Efficiency Question
by mirod
in thread Efficiency Question
by mr.nick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |