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

A trick to avoid caching #487

Open
Nakul93 opened this issue Jun 7, 2021 · 14 comments
Open

A trick to avoid caching #487

Nakul93 opened this issue Jun 7, 2021 · 14 comments
Labels
enhancement New feature or request

Comments

@Nakul93
Copy link
Collaborator

Nakul93 commented Jun 7, 2021

So I just found this video on youtube which explains how we can change the format of date to avoid getting cached data. I think it would be great if we could integrate this in our code.

What are your thoughts guys?

https://www.youtube.com/watch?v=hf44_-qqddY

@warlock2k
Copy link

This is cool, I think we can do this.

However, since this is already public, do you see a patch coming from cowin for the same soon?

@stockguy78
Copy link

Why do they want to Cache data for UI ? doesn't make sense at all..

@6mxo89sqh
Copy link
Collaborator

I noticed this last night while doing some testing.

@Nakul93
Copy link
Collaborator Author

Nakul93 commented Jun 7, 2021

This is cool, I think we can do this.

However, since this is already public, do you see a patch coming from cowin for the same soon?

Yeah thats the annoying part they probably might release a patch to fix this

@Nakul93
Copy link
Collaborator Author

Nakul93 commented Jun 7, 2021

Even with our current script caching doesn't seem to be a problem if we are using findBy* APIs. Today I tested for almost 3hrs with 7secs refresh rate and was able to book when slots opened up (it was faster than telegram alerts)

@6mxo89sqh
Copy link
Collaborator

Can some one try this out?
https://github.com/6mxo89sqh/covid-vaccine-booking/tree/date-formats

I stopped getting OTP suddenly so unable to test it end-to-end.

@Nakul93
Copy link
Collaborator Author

Nakul93 commented Jun 7, 2021

Can some one try this out?
https://github.com/6mxo89sqh/covid-vaccine-booking/tree/date-formats

I stopped getting OTP suddenly so unable to test it end-to-end.

Tested it, seems to work fine. Does this change the date format on every API call?

@6mxo89sqh
Copy link
Collaborator

Ya it rotates it.

@shailesh
Copy link
Collaborator

shailesh commented Jun 7, 2021

Have you also raised a PR? I'll test it out.

@shivaslifzz
Copy link

shivaslifzz commented Jun 7, 2021

Can some one try this out?
https://github.com/6mxo89sqh/covid-vaccine-booking/tree/date-formats
I stopped getting OTP suddenly so unable to test it end-to-end.

Tested it, seems to work fine. Does this change the date format on every API call?

I guess it's failing, which find option you used ??

@Nakul93
Copy link
Collaborator Author

Nakul93 commented Jun 7, 2021

@shivaslifzz find by date option for district

@6mxo89sqh
Copy link
Collaborator

Well, I don't think this idea is worth raising the PR. Currently, find by is super strong and this calendar is still bad. We are still restricted by 20sessions.

@Nakul93
Copy link
Collaborator Author

Nakul93 commented Jun 7, 2021

Agree with @6mxo89sqh, for now find by option is perfect. But in future if this was to change then we can use this alternative as a fix.

@Nakul93 Nakul93 added the enhancement New feature or request label Jun 7, 2021
@Nakul93
Copy link
Collaborator Author

Nakul93 commented Jun 9, 2021

Can some one try this out?
https://github.com/6mxo89sqh/covid-vaccine-booking/tree/date-formats

have you tried this with public APIs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants