10 defined(
'JPATH_PLATFORM') or die;
33 public function get( $view, $method =
'display' , $id =
false, $wrkarounds = true )
38 $id = $this->_makeId($view, $method);
41 $data = $this->cache->get($id);
43 $locktest =
new stdClass;
44 $locktest->locked = null;
45 $locktest->locklooped = null;
49 $locktest = $this->cache->lock($id, null);
53 if ($locktest->locked ==
true && $locktest->locklooped ==
true)
55 $data = $this->cache->get($id);
64 $data = unserialize(trim($data));
66 if ($wrkarounds ===
true)
73 echo (isset($data)) ? $data : null;
76 if ($locktest->locked ==
true)
78 $this->cache->unlock($id);
87 if (method_exists($view, $method))
90 if ($locktest->locked ==
false)
92 $locktest = $this->cache->lock($id);
97 ob_implicit_flush(
false);
99 $data = ob_get_contents();
111 $this->cache->store(serialize($cached), $id);
113 if ($locktest->locked ==
true)
115 $this->cache->unlock($id);
131 protected function _makeId(&$view, $method)
133 return md5(serialize(array(
JCache::makeId(), get_class($view), $method)));