-
Notifications
You must be signed in to change notification settings - Fork 886
adding redis cache decorator #1952
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1952 +/- ##
==========================================
+ Coverage 44.66% 53.31% +8.64%
==========================================
Files 63 70 +7
Lines 2624 3157 +533
Branches 56 56
==========================================
+ Hits 1172 1683 +511
- Misses 1452 1474 +22
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Looking good please create a separate folder in example. Call it redis and then have a brief README with a usage example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM please address the minor feedback, post some logs of this thing working and we should be good to merge this
EDIT: Also show how to start the server
examples/redis_cache/README.md
Outdated
|
||
Note that if the pre-requisites are not met, a no op decorator will be used and no exceptions will be raised. | ||
|
||
We will now assume a Redis server is started on `localhost` at port `6379`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show how to start it
Commands to package and serve (same as in README):
Query (same image twice):
Log for when Redis server is NOT started, a no op decorator is used.
With a Redis server:
redis-cli:
Cache evictions is manually tested, hard to show because of random eviction policy. |
Hi @GavinPHR can you please move all your code to the |
@msaroufim Sure I just moved it. |
Gonna close this for now since we're looking at a native cache integration |
Description
Adding a decorator cache the input/output of a handler.
It is assumed that:
A typical usage would be:
Type of change
Feature/Issue validation/testing
Manually tested, difficult to do automated test without Redis in testing environment.
Checklist: