ZF: disable resource plugin in application.ini

How to disable cache in cli environment?

When a reason arises, the system user who runs the script is not allowed to write to the cache directory, so the script cannot execute.

In my application.ini application, I have

[production]

resources.cachemanager.database.frontend.name = Core
resources.cachemanager.database.frontend.customFrontendNaming = false
resources.cachemanager.database.frontend.options.lifetime = 7200
resources.cachemanager.database.frontend.options.automatic_serialization = true
resources.cachemanager.database.backend.name = File
resources.cachemanager.database.backend.customBackendNaming = false
resources.cachemanager.database.backend.options.cache_dir = HTTPDOCS_PATH "/data/cache/database"
resources.cachemanager.database.frontendBackendAutoload = false

[cli : production]

* <]: -)

+2
source share
2 answers

Try

resources.cachemanager.database.frontend.options.caching = false

See the API and ZF Reference for a property $_optionsinZend_Cache_Core

+4
source

, , . , Zend_Config_Ini , HTML CSS class. (, ). [myplugsection], [production] [myplug], [cli] - , Doctrine actAs beahviors.

, , - , [core], , [production]. [production] [cli] [core], [production] , [cli] - .

, Bootstrap, . , $front->unregisterPlugin(), $front - FrontController.

...

!

+1

Source: https://habr.com/ru/post/1790048/


All Articles