Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Duplicated method chains, removed commented line in admin generator u…

…pdateAction
  • Loading branch information...
commit a52197ae652d63e3dfa06e249524028770b45f8a 1 parent 5fb32f4
Ilya Sabelnikov authored April 09, 2011
4  README.markdown
Source Rendered
@@ -49,7 +49,7 @@ are not (atomic counter).
49 49
 
50 50
 ## New in v4.0.0:
51 51
 
52  
-  * Update: Many changes in API
  52
+  * Update: Many API changes
53 53
   * New: Admin generator "cachable" (see more info in README_ADVANCED)
54 54
   * New: Cascading tag deletion through the model relations [GH-6](https://github.com/fruit/sfCacheTaggingPlugin/issues#issue/6)
55 55
   * New: Option ``invalidateCollectionVersionByChangingColumns`` to setup ``Cachetaggable`` behavior (see below) [GH-8](https://github.com/fruit/sfCacheTaggingPlugin/issues#issue/8)
@@ -105,7 +105,7 @@ And after, rebuild your models:
105 105
             class: sfFileTaggingCache
106 106
             param:
107 107
               automatic_cleaning_factor: 0
108  
-              cache_dir: %SF_CACHE_DIR%/sf_tag_cache/data
  108
+              cache_dir: %SF_CACHE_DIR%/sf_tag_cache
109 109
           logger:
110 110
             class: sfFileCacheTagLogger
111 111
             param:
2  data/generator/sfDoctrineModule/cachable/parts/updateAction.php
@@ -4,6 +4,4 @@ public function executeUpdate(sfWebRequest $request)
4 4
     $this->form = $this->configuration->getForm($this-><?php echo $this->getSingularName() ?>);
5 5
 
6 6
     $this->processForm($request, $this->form);
7  
-
8  
-    // $this->setTemplate('edit');
9 7
   }
26  lib/view/sfViewCacheTagManager.class.php
@@ -435,10 +435,10 @@ public function setPageCache ($uri)
435 435
           self::NAMESPACE_PAGE
436 436
         );
437 437
 
  438
+      $response = $this->getContext()->getResponse();
  439
+
438 440
       // save content in cache
439  
-      $saved = $this->set(
440  
-        $this->getContext()->getResponse(), $uri, $contentTags
441  
-      );
  441
+      $saved = $this->set($response, $uri, $contentTags);
442 442
 
443 443
       if ($saved && sfConfig::get('sf_web_debug'))
444 444
       {
@@ -449,16 +449,16 @@ public function setPageCache ($uri)
449 449
               $this,
450 450
               'view.cache.filter_content',
451 451
               array(
452  
-                'response' => $this->getContext()->getResponse(),
  452
+                'response' => $response,
453 453
                 'uri' => $uri,
454 454
                 'new' => true
455 455
               )
456 456
             ),
457  
-            $this->getContext()->getResponse()->getContent()
  457
+            $response->getContent()
458 458
           )
459 459
           ->getReturnValue();
460 460
 
461  
-        $this->getContext()->getResponse()->setContent($content);
  461
+        $response->setContent($content);
462 462
       }
463 463
     }
464 464
 
@@ -488,10 +488,12 @@ public function setPartialCache ($module, $action, $cacheKey, $content)
488 488
 
489 489
       $contentTags = $tagHandler->getContentTags($namespace);
490 490
 
  491
+      $response = $this->getContext()->getResponse();
  492
+
491 493
       $saved = $this->set(
492 494
         array(
493 495
           'content' => $content,
494  
-          'response' => serialize($this->getContext()->getResponse()),
  496
+          'response' => serialize($response),
495 497
         ),
496 498
         $uri,
497 499
         $contentTags
@@ -506,7 +508,7 @@ public function setPartialCache ($module, $action, $cacheKey, $content)
506 508
               $this,
507 509
               'view.cache.filter_content',
508 510
               array(
509  
-                'response' => $this->getContext()->getResponse(),
  511
+                'response' => $response,
510 512
                 'uri' => $uri,
511 513
                 'new' => true,
512 514
               )
@@ -635,6 +637,8 @@ public function getPageCache ($uri)
635 637
       {
636 638
         $this->getContext()->setResponse($cachedResponse);
637 639
 
  640
+        $response = $this->getContext()->getResponse();
  641
+
638 642
         if (sfConfig::get('sf_web_debug'))
639 643
         {
640 644
           $content = $this
@@ -644,16 +648,16 @@ public function getPageCache ($uri)
644 648
                 $this,
645 649
                 'view.cache.filter_content',
646 650
                 array(
647  
-                  'response' => $this->getContext()->getResponse(),
  651
+                  'response' => $response,
648 652
                   'uri' => $uri,
649 653
                   'new' => false,
650 654
                 )
651 655
               ),
652  
-              $this->getContext()->getResponse()->getContent()
  656
+              $response->getContent()
653 657
             )
654 658
             ->getReturnValue();
655 659
 
656  
-          $this->getContext()->getResponse()->setContent($content);
  660
+          $response->setContent($content);
657 661
         }
658 662
       }
659 663
 

0 notes on commit a52197a

Please sign in to comment.
Something went wrong with that request. Please try again.