Added predis lib. Added +session +doctrine cache.

This commit is contained in:
2020-01-26 13:20:12 +03:00
parent 6a43d5d028
commit da5ead3066
7 changed files with 88 additions and 11 deletions
+1
View File
@@ -7,6 +7,7 @@
"ext-iconv": "*",
"knpuniversity/oauth2-client-bundle": "^1.32",
"league/oauth2-google": "^3.0",
"predis/predis": "^1.1",
"sensio/framework-extra-bundle": "^5.5",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.4.*",
Generated
+51 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "067b0e9ecd420b1b48945900bf4c8987",
"content-hash": "486a0b9f008b383a0bdd60439cb32c18",
"packages": [
{
"name": "doctrine/annotations",
@@ -1967,6 +1967,56 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2019-08-22T18:11:29+00:00"
},
{
"name": "predis/predis",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "f0210e38881631afeafb56ab43405a92cafd9fd1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1",
"reference": "f0210e38881631afeafb56ab43405a92cafd9fd1",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"type": "library",
"autoload": {
"psr-4": {
"Predis\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "suppakilla@gmail.com",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
],
"time": "2016-06-16T16:22:20+00:00"
},
{
"name": "psr/cache",
"version": "1.0.1",
+10
View File
@@ -16,3 +16,13 @@ doctrine:
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
metadata_cache_driver:
type: service
id: redis_cache_service
result_cache_driver:
type: service
id: redis_cache_service
query_cache_driver:
type: service
id: redis_cache_service
+1 -1
View File
@@ -6,7 +6,7 @@ framework:
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler
cookie_secure: auto
cookie_samesite: lax
+9 -9
View File
@@ -1,15 +1,15 @@
doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: pool
pool: doctrine.system_cache_pool
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
# metadata_cache_driver:
# type: pool
# pool: doctrine.system_cache_pool
# query_cache_driver:
# type: pool
# pool: doctrine.system_cache_pool
# result_cache_driver:
# type: pool
# pool: doctrine.result_cache_pool
framework:
cache:
+13
View File
@@ -25,3 +25,16 @@ services:
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
Predis\Client:
arguments:
- '%env(REDIS_URL)%'
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler:
arguments:
- '@Predis\Client'
redis_cache_service:
class: Doctrine\Common\Cache\PredisCache
arguments:
- '@Predis\Client'
+3
View File
@@ -144,6 +144,9 @@
"phpdocumentor/type-resolver": {
"version": "1.0.1"
},
"predis/predis": {
"version": "v1.1.1"
},
"psr/cache": {
"version": "1.0.1"
},