Browse Source

#11560: removed ZendDataCache remains (#15955)

tags/3.0.0-alpha1
Pavel Ivanov 7 years ago committed by Alexander Makarov
parent
commit
8005748714
  1. 2
      .gitlab-ci.yml
  2. 2
      .travis.yml
  3. 4
      docs/guide-fr/caching-data.md
  4. 75
      framework/caching/ZendDataCache.php
  5. 2
      tests/README.md

2
.gitlab-ci.yml

@ -96,5 +96,5 @@ travis:
- docker-compose up --build -d - docker-compose up --build -d
# wait for dbs ... # wait for dbs ...
- sleep 10 - sleep 10
- docker-compose run --rm php vendor/bin/phpunit -v --exclude wincache,xcache,zenddata - docker-compose run --rm php vendor/bin/phpunit -v --exclude wincache,xcache

2
.travis.yml

@ -131,7 +131,7 @@ script:
# PHP tests # PHP tests
- | - |
if [ $TASK_TESTS_PHP == 1 ]; then if [ $TASK_TESTS_PHP == 1 ]; then
vendor/bin/phpunit --verbose $PHPUNIT_FLAGS --exclude-group wincache,xcache,zenddata vendor/bin/phpunit --verbose $PHPUNIT_FLAGS --exclude-group wincache,xcache
fi fi
after_script: after_script:

4
docs/guide-fr/caching-data.md

@ -101,10 +101,6 @@ Yii prend en charge un large panel de supports de stockage pour cache. Ce qui su
* [[yii\caching\WinCache]]: utilise le [WinCache](http://iis.net/downloads/microsoft/wincache-extension) PHP * [[yii\caching\WinCache]]: utilise le [WinCache](http://iis.net/downloads/microsoft/wincache-extension) PHP
([voir aussi l'extension](http://php.net/manual/en/book.wincache.php)). ([voir aussi l'extension](http://php.net/manual/en/book.wincache.php)).
* [[yii\caching\XCache]] _(deprecated)_: utilise l'extension PHP [XCache](http://xcache.lighttpd.net/). * [[yii\caching\XCache]] _(deprecated)_: utilise l'extension PHP [XCache](http://xcache.lighttpd.net/).
* [[yii\caching\ZendDataCache]] _(deprecated)_: utilise le
[cache de données Zend](http://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm)
en tant que médium de cache sous-jacent.
> Tip: vous pouvez utiliser différents supports de stockage pour cache dans la même application. Une stratégie courante est d'utiliser un support de stockage pour cache basé sur la mémoire pour stocker des données de petite taille mais d'usage constant (p. ex. des données statistiques), et d'utiliser des supports de stockage pour cache basés sur des fichiers ou des bases de données pour stocker des données volumineuses et utilisées moins souvent (p. ex. des contenus de pages). > Tip: vous pouvez utiliser différents supports de stockage pour cache dans la même application. Une stratégie courante est d'utiliser un support de stockage pour cache basé sur la mémoire pour stocker des données de petite taille mais d'usage constant (p. ex. des données statistiques), et d'utiliser des supports de stockage pour cache basés sur des fichiers ou des bases de données pour stocker des données volumineuses et utilisées moins souvent (p. ex. des contenus de pages).

75
framework/caching/ZendDataCache.php

@ -1,75 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\caching;
/**
* ZendDataCache provides Zend data caching in terms of an application component.
*
* To use this application component, the [Zend Data Cache PHP extension](http://www.zend.com/en/products/server/)
* must be loaded.
*
* Application configuration example:
*
* ```php
* return [
* 'components' => [
* 'cache' => [
* '__class' => yii\caching\Cache::class,
* 'handler' => [
* '__class' => yii\caching\ZendDataCache::class,
* ],
* ],
* // ...
* ],
* // ...
* ];
* ```
*
* See [[\Psr\SimpleCache\CacheInterface]] for common cache operations that ZendDataCache supports.
*
* For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview).
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @deprecated since 2.0.14. This class will be removed in 2.1.0.
*/
class ZendDataCache extends SimpleCache
{
/**
* {@inheritdoc}
*/
protected function getValue($key)
{
$result = zend_shm_cache_fetch($key);
return $result === null ? false : $result;
}
/**
* {@inheritdoc}
*/
protected function setValue($key, $value, $ttl)
{
return zend_shm_cache_store($key, $value, $ttl);
}
/**
* {@inheritdoc}
*/
protected function deleteValue($key)
{
return zend_shm_cache_delete($key);
}
/**
* {@inheritdoc}
*/
public function clear()
{
return zend_shm_cache_clear();
}
}

2
tests/README.md

@ -85,7 +85,7 @@ Run a group of unit tests
docker-compose run php vendor/bin/phpunit -v --group caching,db docker-compose run php vendor/bin/phpunit -v --group caching,db
docker-compose run php vendor/bin/phpunit -v --exclude base,caching,db,i18n,log,mutex,rbac,validators,web docker-compose run php vendor/bin/phpunit -v --exclude base,caching,db,i18n,log,mutex,rbac,validators,web
docker-compose run php vendor/bin/phpunit -v --exclude wincache,xcache,zenddata docker-compose run php vendor/bin/phpunit -v --exclude wincache,xcache
> Note: Documentation about [installing additional extensions](https://github.com/yiisoft/yii2-docker/blob/master/docs/install-extensions.md) can be found at `yiisoft/yii2-docker`. > Note: Documentation about [installing additional extensions](https://github.com/yiisoft/yii2-docker/blob/master/docs/install-extensions.md) can be found at `yiisoft/yii2-docker`.

Loading…
Cancel
Save