|
Revision 2, 355 bytes
(checked in by nperriault, 2 years ago)
|
First commit of the extracted code from production, I hope no passwd has been forgotten :-)
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
class conditionalCacheFilter extends sfFilter |
|---|
| 3 |
{ |
|---|
| 4 |
|
|---|
| 5 |
public function execute($filterChain) |
|---|
| 6 |
{ |
|---|
| 7 |
$context = $this->getContext(); |
|---|
| 8 |
if ($context->getUser()->isAuthenticated()) |
|---|
| 9 |
{ |
|---|
| 10 |
$cache = $context->getViewCacheManager(); |
|---|
| 11 |
if ($cache) |
|---|
| 12 |
{ |
|---|
| 13 |
sfConfig::set('sf_cache', false); |
|---|
| 14 |
} |
|---|
| 15 |
} |
|---|
| 16 |
$filterChain->execute(); |
|---|
| 17 |
} |
|---|
| 18 |
|
|---|
| 19 |
} |
|---|
| 20 |
|
|---|