8000 [DynamoDB] Cache Adapter for Symfony · Issue #998 · async-aws/aws · GitHub
[go: up one dir, main page]

Skip to content

[DynamoDB] Cache Adapter for Symfony #998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ker0x opened this issue Apr 29, 2021 · 8 comments
Closed

[DynamoDB] Cache Adapter for Symfony #998

ker0x opened this issue Apr 29, 2021 · 8 comments

Comments

@ker0x
Copy link
ker0x commented Apr 29, 2021

Hello!

While reading the documentation, I didn't see any mention of the possibility to use the DynamoDB client as a cache adapter for Symfony.

However, seeing there is already one for Laravel, i though it could be great to add one for Symfony too. Is it something you would consider?

@Nyholm
Copy link
Member
Nyholm commented Apr 30, 2021

Hello!

That is true. Should we add a PSR-6 compatible cache with DynamoDB? Sure, if you find it useful.

But is DynamoDB a good cache provider? Ie compared to Redis.

@ker0x
Copy link
Author
ker0x commented Apr 30, 2021

But is DynamoDB a good cache provider? Ie compared to Redis.

tbh, idk, maybe i'm looking in the wrong direction, but here some context regarding my request:

I'm currently testing things with Symfony + Bref on AWS Lambda and i would like to setup some persistent cache. As I'm fairly new to AWS and serverless in general maybe DynamoDB is the wrong choice.

However, I could use this package but it require the whole AWS PHP SDK which seems a bit overkill for just using one service.

@Nyholm
Copy link
Member
Nyholm commented Apr 30, 2021

Im running Symfony + Bref on AWS. The very best solution is to set up ElasticCache (Redis) and use symfony/cache' redis adapter.

You will need the extra php extension. I use a redis cluster any my DSN (used with Symfony) looks like this:

REDIS_CACHE_DSN='redis:?host[acme.zersin.clustercfg.euc1.cache.amazonaws.com]&lazy=true&redis_cluster=1'

@ker0x
Copy link
Author
ker0x commented Apr 30, 2021

Thank you for your reply, i'll look into it.

@Nyholm
Copy link
Member
Nyholm commented May 13, 2021

How did it work out for you?

@RikudouSage
Copy link

I updated the mentioned package to use async-aws instead of the full AWS SDK.

@nealio82
Copy link
Contributor
nealio82 commented Oct 4, 2022

But is DynamoDB a good cache provider? Ie compared to Redis.

@Nyholm I think it's a good solution. Depending on how you design your keys it's going to be pretty effing quick, (maybe as fast as Redis, i don't know?), and IMO it's the more 'serverless' way of doing things as you don't need to care about node sizes or paying for over-provisioned capacity at times that you have less traffic.

@stof
Copy link
Member
stof commented Jul 11, 2023

I'm closing this issue as this is implemented in https://github.com/RikudouSage/DynamoDbCachePsr6

@stof stof closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
0