Converted all existing uses of cache.

This commit is contained in:
JT Smith 2009-09-25 22:24:33 -05:00
parent af705232a8
commit ccff9c7014
31 changed files with 108 additions and 144 deletions

View file

@ -147,9 +147,8 @@ sub cascadeLineage {
"UPDATE asset SET lineage=CONCAT(?,SUBSTRING(lineage,?)) WHERE lineage LIKE ?",
[$newLineage, length($oldLineage) + 1, $oldLineage . '%']
);
my $cache = WebGUI::Cache->new($self->session);
if ($records > 20) {
$cache->flush;
$self->session->cache->flush;
}
else {
my $descendants = $self->session->db->read("SELECT assetId FROM asset WHERE lineage LIKE ?", [$newLineage . '%']);