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

Develop caching mechanisms #8

Open
abinashmeher999 opened this issue Nov 25, 2016 · 11 comments
Open

Develop caching mechanisms #8

abinashmeher999 opened this issue Nov 25, 2016 · 11 comments

Comments

@abinashmeher999
Copy link
Owner

This would aim to minimize calls to the API for repetitive requests. The idea is to use the information which has already been obtained from the API for a second query of the same page. There are many more concerns like how long before the cache expires etc which can be further discussed here if anyone is interested.

@theskcd
Copy link
Collaborator

theskcd commented Dec 1, 2016

Hi all,
I think we can use either redis/mecahce to implement the same. I would like to discuss more about about this 😄

@abinashmeher999
Copy link
Owner Author

I just had a look at redis python package. It requires a redis server to be running. If we look at the use case of the package, personally I feel the user isn't going to setup a redis server to use the feature. Correct me if I am wrong but isn't redis mostly used on the server side? The one we are looking at is a client side one.

We are looking at just saving a few repetitive requests. Is setting up redis worth it? IMO a naive one would work too. What do you think?

@theskcd
Copy link
Collaborator

theskcd commented Dec 1, 2016

Well, You are right when you say that. I think instead we can have inter-program communication modules set up so that there is some in-memory caching mechanism with fixed "memory-units" (so that it dosent end up eating a lot of system memory) where we can cache and query for the data.
What do you say to that?

@abinashmeher999
Copy link
Owner Author

That sounds good! 👍

@theskcd
Copy link
Collaborator

theskcd commented Dec 1, 2016

I will start working on something then.. 👍 , so should i first fork the repo and make my commits over there?

@abinashmeher999
Copy link
Owner Author

@sandeepkumarpani888 Yes. Go ahead.

@abinashmeher999
Copy link
Owner Author

@sandeepkumarpani888 What are your thoughts on using a bloom filter for checking if something should be cached?
P.S. See the first example in the 'Examples' section https://en.wikipedia.org/wiki/Bloom_filter

@theskcd
Copy link
Collaborator

theskcd commented Jan 1, 2017

Yeah, I think we can work with this .. but there must be already be a library for the same. :)

@abinashmeher999
Copy link
Owner Author

abinashmeher999 commented Jan 1, 2017

There is. pybloom.

@theskcd
Copy link
Collaborator

theskcd commented Jan 1, 2017

Nice !

@abinashmeher999
Copy link
Owner Author

Just discovered this gem pun not intended https://pypi.python.org/pypi/cached-property and @ayuhsya has volunteered to integrate this over the weekend. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants