Central cache access for Assets to handle SSL caching. Fixes bug #11131.
This commit is contained in:
parent
f35a9af1fe
commit
5bd5bb48a9
11 changed files with 40 additions and 15 deletions
|
|
@ -350,7 +350,8 @@ sub view {
|
|||
my $self = shift;
|
||||
if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10 && !$self->session->form->process("overrideTemplateId") &&
|
||||
!$self->session->form->process($self->paginateVar) && !$self->session->form->process("makePrintable")) {
|
||||
my $out = WebGUI::Cache->new($self->session,"view_".$self->getId)->get;
|
||||
my $cache = $self->getCache;
|
||||
my $out = $cache->get if defined $cache;
|
||||
return $out if $out;
|
||||
}
|
||||
my %var;
|
||||
|
|
|
|||
|
|
@ -409,12 +409,8 @@ sub www_view {
|
|||
) {
|
||||
my $check = $self->checkView;
|
||||
return $check if (defined $check);
|
||||
my $cacheKey = "view_".$self->getId;
|
||||
if ($session->env->sslRequest) {
|
||||
$cacheKey .= '_ssl';
|
||||
}
|
||||
my $cache = WebGUI::Cache->new($session, $cacheKey);
|
||||
my $out = $cache->get if defined $cache;
|
||||
my $cache = $self->getCache;
|
||||
my $out = $cache->get if defined $cache;
|
||||
unless ($out) {
|
||||
$self->prepareView;
|
||||
$session->stow->set("cacheFixOverride", 1);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,8 @@ to be displayed within the page style
|
|||
sub view {
|
||||
my $self = shift;
|
||||
if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) {
|
||||
my $out = WebGUI::Cache->new($self->session,"view_".$self->getId)->get;
|
||||
my $cache = $self->getCache;
|
||||
my $out = $cache->get if defined $cache;
|
||||
return $out if $out;
|
||||
}
|
||||
my $i18n = WebGUI::International->new($self->session, 'Asset_MultiSearch');
|
||||
|
|
|
|||
|
|
@ -534,7 +534,8 @@ if the user is not in Admin Mode.
|
|||
sub view {
|
||||
my $self = shift;
|
||||
if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) {
|
||||
my $out = WebGUI::Cache->new($self->session,"view_".$self->getId)->get;
|
||||
my $cache = $self->getCache;
|
||||
my $out = $cache->get if defined $cache;
|
||||
return $out if $out;
|
||||
}
|
||||
# Initiate an empty debug loop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue