~fusonic/chive/1.1

« back to all changes in this revision

Viewing changes to yii/caching/CMemCache.php

  • Committer: Matthias Burtscher
  • Date: 2010-02-12 09:12:35 UTC
  • Revision ID: matthias.burtscher@fusonic.net-20100212091235-jqxrb62klx872ajc
* Updated Yii to 1.1.0
* Removed CodePress and CodeMirror
* Updated jQuery and some plugins
* Cleaned some code ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *
5
5
 * @author Qiang Xue <qiang.xue@gmail.com>
6
6
 * @link http://www.yiiframework.com/
7
 
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 
7
 * @copyright Copyright &copy; 2008-2010 Yii Software LLC
8
8
 * @license http://www.yiiframework.com/license/
9
9
 */
10
10
 
52
52
 * To do so, set {@link useMemcached} to be true.
53
53
 *
54
54
 * @author Qiang Xue <qiang.xue@gmail.com>
55
 
 * @version $Id: CMemCache.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
55
 * @version $Id: CMemCache.php 1678 2010-01-07 21:02:00Z qiang.xue $
56
56
 * @package system.caching
57
57
 * @since 1.0
58
58
 */
148
148
         */
149
149
        protected function getValues($keys)
150
150
        {
151
 
                return array_combine($keys,$this->_cache->get($keys));
 
151
                return $this->useMemcached ? $this->_cache->getMulti($keys) : $this->_cache->get($keys);
152
152
        }
153
153
 
154
154
        /**
167
167
                else
168
168
                        $expire=0;
169
169
 
170
 
                return $this->_cache->set($key,$value,0,$expire);
 
170
                return $this->useMemcached ? $this->_cache->set($key,$value,$expire) : $this->_cache->set($key,$value,0,$expire);
171
171
        }
172
172
 
173
173
        /**
186
186
                else
187
187
                        $expire=0;
188
188
 
189
 
                return $this->_cache->add($key,$value,0,$expire);
 
189
                return $this->useMemcached ? $this->_cache->add($key,$value,$expire) : $this->_cache->add($key,$value,0,$expire);
190
190
        }
191
191
 
192
192
        /**
217
217
 * for detailed explanation of each configuration property.
218
218
 *
219
219
 * @author Qiang Xue <qiang.xue@gmail.com>
220
 
 * @version $Id: CMemCache.php 1290 2009-08-06 16:13:11Z qiang.xue $
 
220
 * @version $Id: CMemCache.php 1678 2010-01-07 21:02:00Z qiang.xue $
221
221
 * @package system.caching
222
222
 * @since 1.0
223
223
 */