fix lineage cache clearing, syntax warning, db cache storable usage
This commit is contained in:
parent
7867ba61d5
commit
3cb07d4152
3 changed files with 4 additions and 5 deletions
|
|
@ -122,7 +122,7 @@ sub cascadeLineage {
|
|||
$cache->flush;
|
||||
}
|
||||
else {
|
||||
my $descendants = $self->session->db->read("SELECT assetId FROM asset WHERE lineage LIKE ?", [$newLineage]);
|
||||
my $descendants = $self->session->db->read("SELECT assetId FROM asset WHERE lineage LIKE ?", [$newLineage . '%']);
|
||||
while (my ($assetId, $lineage) = $descendants->array) {
|
||||
$cache->deleteChunk(["asset",$assetId]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ package WebGUI::Cache::Database;
|
|||
|
||||
use strict;
|
||||
use base "WebGUI::Cache";
|
||||
use Storable qw(freeze thaw);
|
||||
use Storable ();
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ sub get {
|
|||
return undef unless ($content);
|
||||
# Storable doesn't like non-reference arguments, so we wrap it in a scalar ref.
|
||||
eval {
|
||||
$content = thaw($content);
|
||||
$content = Storable::thaw($content);
|
||||
};
|
||||
return undef unless $content && ref $content;
|
||||
return $$content;
|
||||
|
|
@ -175,7 +175,7 @@ The time to live for this content. This is the amount of time (in seconds) that
|
|||
sub set {
|
||||
my $self = shift;
|
||||
# Storable doesn't like non-reference arguments, so we wrap it in a scalar ref.
|
||||
my $content = freeze(\(scalar shift));
|
||||
my $content = Storable::nfreeze(\(scalar shift));
|
||||
my $ttl = shift || 60;
|
||||
my $size = length($content);
|
||||
# getting better performance using native dbi than webgui sql
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ sub www_addFriendSave {
|
|||
return $session->style->userStyle($output);
|
||||
}
|
||||
|
||||
my $friends = WebGUI::Friends->new($session);
|
||||
$friends->sendAddRequest($friendId, $session->form->get('comments'));
|
||||
|
||||
# display result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue