Changeset 1662
- Timestamp:
- 03/02/10 13:44:43 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ullCorePlugin/config/ullCorePluginConfiguration.class.php
r1538 r1662 23 23 // KU: 2009-11-19: disabled apc cache because of typical caching problems. 24 24 // let's see if we really need it. 25 // if (extension_loaded('apc'))26 // {27 // $cacheDriver = new Doctrine_Cache_Apc();28 // }29 // else30 // {31 // Array cache driver only caches during a single request32 $cacheDriver = new Doctrine_Cache_Array();33 // }25 // if (extension_loaded('apc')) 26 // { 27 // $cacheDriver = new Doctrine_Cache_Apc(); 28 // } 29 // else 30 // { 31 // Array cache driver only caches during a single request 32 $cacheDriver = new Doctrine_Cache_Array(); 33 // } 34 34 35 // $manager->setAttribute(Doctrine::ATTR_RESULT_CACHE_LIFESPAN, 60 * 5);35 // $manager->setAttribute(Doctrine::ATTR_RESULT_CACHE_LIFESPAN, 60 * 5); 36 36 37 37 $manager->setAttribute(Doctrine::ATTR_RESULT_CACHE, $cacheDriver); 38 39 38 40 39 // disabled because ist has sideeffects which have to be investigated (i18n, ...) … … 43 42 // disabled because ist has sideeffects which have to be investigated 44 43 // $manager->setAttribute('use_dql_callbacks', true); 44 45 $this->createHTMLPurifierCache(); 45 46 } 46 47 48 /** 49 * Create cache dir tree for HTML Purifier if not already available 50 */ 51 protected function createHTMLPurifierCache() 52 { 53 $purifierCachePath = sfConfig::get('sf_cache_dir') . DIRECTORY_SEPARATOR . 'htmlpurifier'; 54 55 if (!file_exists($purifierCachePath)) 56 { 57 mkdir($purifierCachePath, 0755); 58 59 foreach(array('HTML', 'CSS', 'URI') as $type) 60 { 61 mkdir($purifierCachePath . DIRECTORY_SEPARATOR . $type, 0777, true); 62 //set perms again because of interfering umask 63 chmod($purifierCachePath . DIRECTORY_SEPARATOR . $type, 0777); 64 } 65 } 66 67 sfConfig::add(array('htmlpurifier_cache_dir' => $purifierCachePath)); 68 } 47 69 }
