Skip to content
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

[V2] Cache Mailgun responses #2

Open
frutality opened this issue Jun 13, 2019 · 2 comments
Open

[V2] Cache Mailgun responses #2

frutality opened this issue Jun 13, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@frutality
Copy link

Hello,

Since Mailgun validation isn't free, how do you think, is it possible to add option to cache mailgun responses? If there are 2 or more requests with same email within short period of time - it would make sense.

@TheoKouzelis
Copy link
Owner

Hi Alexander,

Yeah that's a great idea and would be simple to implement. I could write a EmailRuleCache decorator which implement the validate function and creating cache key from the $value and the $parameters. Then it can just wrap the original validate function with Laravel's Cache::remember.

@TheoKouzelis TheoKouzelis added the enhancement New feature or request label Jun 13, 2019
@TheoKouzelis TheoKouzelis self-assigned this Jun 13, 2019
@frutality
Copy link
Author

Cool. I would be glad to help with testing if needed.

@TheoKouzelis TheoKouzelis changed the title Suggestion: cache mailgun responses? [V2] Cache mailgun responses? Jun 21, 2019
@TheoKouzelis TheoKouzelis changed the title [V2] Cache mailgun responses? [V2] Cache Mailgun responses? Jun 21, 2019
@TheoKouzelis TheoKouzelis changed the title [V2] Cache Mailgun responses? [V2] Cache Mailgun responses Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants