Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marioblazek/caching-psrs-in-netgen-stack
This repository holds code for Netgen's internal workshop for using the caching PSR's
https://github.com/marioblazek/caching-psrs-in-netgen-stack
ezplatform php psr-16 psr-6 symfony
Last synced: 5 days ago
JSON representation
This repository holds code for Netgen's internal workshop for using the caching PSR's
- Host: GitHub
- URL: https://github.com/marioblazek/caching-psrs-in-netgen-stack
- Owner: MarioBlazek
- License: other
- Created: 2020-06-04T09:15:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T07:53:47.000Z (about 2 years ago)
- Last Synced: 2024-11-13T03:14:49.965Z (2 months ago)
- Topics: ezplatform, php, psr-16, psr-6, symfony
- Language: HTML
- Homepage: https://netgen.io/
- Size: 3.6 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSR-6 and PSR-16 in Netgen stack
## Description
### PSR-6
For more info about PSR-6 please visit this [link](https://www.php-fig.org/psr/psr-6/).
### PSR-16
For more info about PSR-16 please visit this [link](https://www.php-fig.org/psr/psr-16/).
### Symfony and PSR's
Symfony implement caching PSR's through the [Cache component](https://symfony.com/doc/current/components/cache.html). PSR-16 standard is supported via [adapters](https://symfony.com/doc/current/components/cache/psr6_psr16_adapters.html).
### Redis
1. Include `cache.redis.yml` configuration from `cache_pool`
2. Replace `cache.app` with `cache.redis` in your service arguments
3. Start local Redis server with:```bash
redis-server /usr/local/etc/redis.conf
```4. Test
#### Redis commands
Use `redis-cli` to enter the Redis server through command line.
Once you are inside the Redis you can use this commands:
* `keys *` - to list all the available keys
* `ttl key` - to display the time required for key to expire
* `expire key 0` - explicitly expire the key
* `del key` - delete the key from Redis## Install guide
To install this example do the following:
* clone this repository
* run `composer install`
* create database `php bin/console doctrine:database:create`
* install demo content `php bin/console ezplatform:install netgen-media`
* install frontend dependecies `yarn install`
* build dev assets `yarn build:dev`
* run `symfony serve` to start Symfony server## Presentation
Presentation is available in PDF format and can be accessed [here](PSR-6_and_PRS-16_caching.pdf).