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

refactor caches #50

Merged
merged 1 commit into from
Nov 10, 2016
Merged

refactor caches #50

merged 1 commit into from
Nov 10, 2016

Conversation

wtfrank
Copy link
Contributor

@wtfrank wtfrank commented Nov 5, 2016

move caches into pycrest.cache module

remove cache_dir argument

update documentation about caches

@coveralls
Copy link

coveralls commented Nov 5, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 05f2c92 on wtfrank:cache-refactor-1 into f7a8d28 on pycrest:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 05f2c92 on wtfrank:cache-refactor-1 into f7a8d28 on pycrest:master.

@wtfrank
Copy link
Contributor Author

wtfrank commented Nov 5, 2016

The only weird thing in this pull request is that I've moved the "cache" argument into **kwargs and don't specify it explicitly. The reason for that is if we use cache=DictCache() then I think the DictCache() gets instantiated at module load time which means that the tests don't start with a fresh DictCache object each time, thus they have previously cached responses.

def invalidate(self, key):
return self._mc.delete(self._hash(key))


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unneeded newlines

def invalidate(self, key):
return self._mc.delete(self._hash(key))


class APIConnection(object):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 blank lines before class definition

@coveralls
Copy link

coveralls commented Nov 6, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 6726c42 on wtfrank:cache-refactor-1 into f7a8d28 on pycrest:master.

@coveralls
Copy link

coveralls commented Nov 6, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 6785dbc on wtfrank:cache-refactor-1 into f7a8d28 on pycrest:master.

@coveralls
Copy link

coveralls commented Nov 6, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling a9a37e7 on wtfrank:cache-refactor-1 into f7a8d28 on pycrest:master.

@coveralls
Copy link

coveralls commented Nov 10, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling b54ec0d on wtfrank:cache-refactor-1 into f7a8d28 on pycrest:master.

@wtfrank
Copy link
Contributor Author

wtfrank commented Nov 10, 2016

I also got rid of some pep issues in the cache.py that I found after running pep8

@hkraal hkraal merged commit 1d51b36 into pycrest:master Nov 10, 2016
@Kyria Kyria mentioned this pull request Nov 10, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants