phalcon / incubator-annotations
Phalcon 孵化器注解
v1.0.0
2021-03-28 13:56 UTC
Requires
- php: >=7.2
- ext-phalcon: ^4.0
Requires (Dev)
- codeception/codeception: ^4.1
- codeception/module-asserts: ^1.0.0
- phalcon/ide-stubs: ^4.0
- phpstan/phpstan: ^0.12.18
- phpunit/php-token-stream: 3.1.2
- squizlabs/php_codesniffer: 3.5.1
- vimeo/psalm: 3.18.2
- vlucas/phpdotenv: ^4.1
- webmozart/glob: 4.1.0
This package is auto-updated.
Last update: 2024-09-19 22:40:27 UTC
README
此处提供适配器的使用示例
Memcached
将解析后的注解存储到Memcached中。此适配器使用Phalcon\Cache\Adapter\Libmemcached
后端存储缓存内容
use Phalcon\Incubator\Annotations\Adapter\Memcached; $di->set( 'annotations', function () { return new Memcached( [ 'lifetime' => 8600, 'host' => 'localhost', 'port' => 11211, 'weight' => 1, 'prefix' => 'prefix.', ] ); } );
Redis
将解析后的注解存储到Redis中。此适配器使用Phalcon\Cache\Adapter\Redis
后端存储缓存内容
use Phalcon\Incubator\Annotations\Adapter\Redis; $di->set( 'annotations', function () { return new Redis( [ 'lifetime' => 8600, 'host' => 'localhost', 'port' => 6379, 'prefix' => 'annotations_', ] ); } );