Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony] cache i usuwanie z cache, sf.1.4
janek9
post
Post #1





Grupa: Zarejestrowani
Postów: 121
Pomógł: 2
Dołączył: 22.03.2009

Ostrzeżenie: (0%)
-----


Czesc. Chcialbym zeby mi ktos wytlumaczyl na czym polega usuwanie z cache.

Dla przykładu
  1.  
  2. public function executePublish(sfWebRequest $request)
  3. {
  4. $request->checkCSRFProtection();
  5.  
  6. $job = $this->getRoute()->getObject();
  7. $job->publish();
  8.  
  9. if ($cache = $this->getContext()->getViewCacheManager())
  10. {
  11. $cache->remove('sfJobeetJob/index?sf_culture=*');
  12. $cache->remove('sfJobeetCategory/show?id='.$job->getJobeetCategory()->getId());
  13. }
  14.  
  15. $this->getUser()->setFlash('notice', sprintf('Your job is now online for %s days.', sfConfig::get('app_active_days')));
  16.  
  17. $this->redirect($this->generateUrl('job_show_user', $job));
  18. }
  19.  



nierozumiem tak naprawde co ten "remove" wykonuje. Usuwa pliki z cache to wiem, ale nie rozumiem jak np usunac cale cache z frontend jezeli potrzebuje. Prosze o wytlumaczenie na czym to polega


Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 21:36