10 defined(
'JPATH_PLATFORM') or die;
37 protected $_locktest = null;
49 public function get($id =
false, $group =
'page')
54 $id = $this->_makeId();
58 if (!headers_sent() && isset($_SERVER[
'HTTP_IF_NONE_MATCH']))
60 $etag = stripslashes($_SERVER[
'HTTP_IF_NONE_MATCH']);
63 $browserCache = isset($this->options[
'browsercache']) ? $this->options[
'browsercache'] :
false;
72 $data = $this->cache->get($id, $group);
74 $this->_locktest =
new stdClass;
75 $this->_locktest->locked = null;
76 $this->_locktest->locklooped = null;
80 $this->_locktest = $this->cache->lock($id, $group);
81 if ($this->_locktest->locked ==
true && $this->_locktest->locklooped ==
true)
83 $data = $this->cache->get($id, $group);
89 $data = unserialize(trim($data));
94 if ($this->_locktest->locked ==
true)
96 $this->cache->unlock($id, $group);
103 $this->_group = $group;
120 public function store($data, $id, $group = null, $wrkarounds =
true)
135 $group = $this->_group;
150 if ($this->_locktest->locked ==
false)
152 $this->_locktest = $this->cache->lock($id, $group);
155 $sucess = $this->cache->store(serialize($data), $id, $group);
157 if ($this->_locktest->locked ==
true)
159 $this->cache->unlock($id, $group);
176 protected function _makeId()
189 protected function _noChange()
194 header(
'HTTP/1.x 304 Not Modified',
true);
207 protected function _setEtag($etag)