Kaynağa Gözat

reconfiguring to use doctrine_cache instead of liip

cjohnson 11 yıl önce
ebeveyn
işleme
0baa46875a
3 değiştirilmiş dosya ile 17 ekleme ve 14 silme
  1. 14 11
      README.md
  2. 2 2
      Resources/config/services.yml
  3. 1 1
      composer.json

+ 14 - 11
README.md

@@ -111,7 +111,7 @@ And register the bundle in your appkernel.php file
 ``` php
 return array(
    // ...
-   new Liip\DoctrineCacheBundle\LiipDoctrineCacheBundle(),
+   new Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
    new Mmoreram\GearmanBundle\GearmanBundle(),
    // ...
 );
@@ -125,10 +125,11 @@ Also we must config gearman cache, using doctrine cache.
 > The reason to allow workers to kill themselves is just to prevent each process to accumulate a large quantity of memory.
 
 ``` yml
-liip_doctrine_cache:
-   namespaces:
-      gearman:
-         type: file_system
+doctrine_cache:
+    providers:
+        gearman_cache:
+            type: file_system
+            namespace: doctrine_cache.ns.gearman
 
 
 gearman:
@@ -205,16 +206,18 @@ In development mode you do not want to cache things over more than one request.
 
 ``` yml
 #config.yml
-liip_doctrine_cache:
-    namespaces:
-        gearman:
+doctrine_cache:
+    providers:
+        gearman_cache:
             type: file_system
+            namespace: doctrine_cache.ns.gearman
 
 # config_dev.yml
-liip_doctrine_cache:
-    namespaces:
-        gearman:
+doctrine_cache:
+    providers:
+        gearman_cache:
             type: array
+            namespace: doctrine_cache.ns.gearman
 ```
 
 ## Tests

+ 2 - 2
Resources/config/services.yml

@@ -43,10 +43,10 @@ services:
         class: %gearman.cache.wrapper.class%
         arguments:
             gearman_parser: @gearman.parser
-            gearman_cache: @liip_doctrine_cache.ns.gearman
+            gearman_cache: @doctrine_cache.providers.gearman_cache
             gearman_cache_id: %gearman.cache.id%
         calls:
-            - [load,  [@liip_doctrine_cache.ns.gearman, %gearman.cache.id%]]
+            - [load,  [@doctrine_cache.providers.gearman_cache, %gearman.cache.id%]]
         tags:
             - { name: kernel.cache_clearer }
             - { name: kernel.cache_warmer, priority: 0 }

+ 1 - 1
composer.json

@@ -26,7 +26,7 @@
         "symfony/config": ">=2.1",
         "symfony/http-kernel": ">=2.1",
         "symfony/dependency-injection": ">=2.1",
-        "liip/doctrine-cache-bundle": "1.0.4"
+        "doctrine/doctrine-cache-bundle": "1.0.0"
     },
     "require-dev": {
         "phpunit/phpunit": "3.7.*"