1. sfWebDebugPanelCache.class.php
  2. /** * sfWebDebugPanelCache adds a panel to the web debug toolbar with a link to ignore the cache * on the next request. * * @package symfony * @subpackage debug * @author Fabien Potencier * @version SVN: $Id: sfWebDebugPanelCache.class.php 22932 2009-10-11 22:40:20Z Kris.Wallsmith $ */
  3. class sfWebDebugPanelCache extends sfWebDebugPanel
  4. {
  5. public function getTitle()
  6. {
  7. return '<img src="'.$this->webDebug->getOption('image_root_path').'/reload.png" alt="Reload" />';
  8. }
  9. public function getTitleUrl()
  10. {
  11. $queryString = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
  12. if (false === strpos($queryString, '_sf_ignore_cache'))
  13. {
  14. return sprintf('?%s_sf_ignore_cache=1', $queryString ? $queryString.'&' : '');
  15. }
  16. else
  17. {
  18. return '?'.$queryString;
  19. }
  20. }
  21. public function getPanelTitle()
  22. {
  23. return 'reload and ignore cache';
  24. }
  25. public function getPanelContent()
  26. {
  27. }
  28. }

Debug toolbar