Skip to content

Commit

Permalink
Add stubs for redis and memory
Browse files Browse the repository at this point in the history
References #4 and references #6
  • Loading branch information
cthoyt authored and shaypal5 committed Nov 17, 2020
1 parent 79b407e commit fdf448e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cachier/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ def cachier(
if mongetter is None:
raise ValueError('must specify ``mongetter`` when using the mongo core')
core = _MongoCore(mongetter, stale_after, next_time, wait_for_calc_timeout)
elif backend == 'memory':
raise NotImplementedError(
'An in-memory backend has not yet been implemented. '
'Please see https://github.com/shaypal5/cachier/issues/6'
)
elif backend == 'redis':
raise NotImplementedError(
'A Redis backend has not yet been implemented. '
'Please see https://github.com/shaypal5/cachier/issues/4'
)
else:
raise ValueError('specified an invalid core: {}'.format(backend))

Expand Down

0 comments on commit fdf448e

Please sign in to comment.