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

Docs clarification on cache update logic #62

Closed
Lucas-C opened this issue Dec 14, 2017 · 2 comments
Closed

Docs clarification on cache update logic #62

Lucas-C opened this issue Dec 14, 2017 · 2 comments

Comments

@Lucas-C
Copy link

Lucas-C commented Dec 14, 2017

Hi.

On the diagram in the README (nice & clear BTW), I can read:

HTML storage update trigger cache update

Could you somehow please explain what that means in the docs ?
When exactly / how does the cache gets updated ?

@Lucas-C Lucas-C changed the title Docs clarification Docs clarification on cache update logic Dec 14, 2017
@elliotgao2
Copy link
Owner

Thanks for your question which reminds me. Both storage and cache has a attribute timeout, which determine when they should be updated.

When the storage expired, we would remove the html and send a new request to the source site. When the cache expired, we would parse HTML again.

But if the storage get updated and the cache didn't, we couldn't get expected results. We should make
sure that the cache update when the storage update. Meanwhile, give them a new timeout.

So every storaged HTML should have a symbol showing if it is valid.Every time we get cache, we check the symbol.

We haven't finished this right now.

@Lucas-C
Copy link
Author

Lucas-C commented Dec 14, 2017

OK. Thanks for the quick answer.

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

No branches or pull requests

2 participants