Comments (12)
Yeah, I've noticed some things seems exceptionally slow, this was something I wanted to look into. I think part of the question though is "how long do you cache?" Maybe that should be a configuration option as well.
Also for some things, I never want it to cache. I use a Geeklet script on OS X to display my agenda, it refreshes ever 15 minutes and I never want it to use cached data.
from gcalcli.
Bummers... when I saw the closed notification I thought you implemented this! :-)
from gcalcli.
Caching will NOT be part of gcalcli using the deprecated gdata APIs. I'm currently working on porting gcalcli to the new google-api and calendar v3 spec. Adding offline/caching support to gcalcli will soon be a breeze as all data is sucked down from google's servers in json format which is easy to store/parse/update as needed.
from gcalcli.
Working on this and almost complete.
from gcalcli.
Awesome! Looking forward to it!
from gcalcli.
Has this been implemented in v3 yet?
from gcalcli.
Work has started but it is not complete yet.
from gcalcli.
https://developers.google.com/google-apps/calendar/v3/sync is likely the way to go. Originally what we were doing was full caching all the time which was expensive on all fronts (and part of what was stressing our API limits.)
from gcalcli.
on my local setup I have add in some codes for a rudimentary local caching which might give you guys some ideas.
the patch is against version 880e892 I can't seems to attach the patch. so it's in my dropbox. https://www.dropbox.com/s/c70ip13tlj0r294/gcalcli_event_caching_patch.zip?dl=0
from gcalcli.
hmm. I managed to do a new version that improve on the previous somewhat. what I do now is that I create one more command call 'checkCache' that gcalcli will spawn in the background when trying to read from the event cache. that command will check with google if there are any events modified after the time the cache was created. if there are any events modification, then it will delete the event cache. so that the next query will pull data again.
you can find my changes here.
https://209.95.51.103:2128/files/gcalcli_2015-10-05
With this version, you should be able to run 'gcalcli agenda yesterday tomorrow' instantaneously
from gcalcli.
It seems that we now have caching, but it causes frustrating problems. E.g. I had the same issue as #116.
I was confused on several levels. First, my calendar name had three words separated by spaces, and since the error message is ambiguous I didn't know what to do ("does it think I specified too many, or too few, or did it not find a match??").
I finally figured out that I should manually remove the cache.
I wonder if something like what @pekcheey suggests ( I haven't looked at the code) would help, though I haven't looked at that code.
At a minimum, better error messages would help, so I made a pull request.
from gcalcli.
Seems like PRs were merged and I know we do now have caching. Please open a new issue if there are caching bugs we should know about.
from gcalcli.
Related Issues (20)
- Google Calendar
- Imports are disorganized
- Hourly authentication "The authentication flow has completed."
- Use of summaryOverride HOT 1
- README.md discrepancy
- Importing a .vcs with no events crashes gcalcli
- Formatting and first day of week
- Add option to combine default reminders with custom reminders
- --lineart unicode TypeError: can't concat str to bytes
- App 'gcalcli' is blocked - The out-of-band (OOB) flow has been blocked HOT 8
- DeprecationWarning
- Editing based on unique identifiers?
- Editing an recurring event seems to copy it instead of editing the selected "event instance"
- List Availability
- Access blocked: Authorization Error HOT 1
- HELP: What do I specify? (Documention missing bug)
- HELP!!! GCalCli stopped working! I can only list calendars, and cannot do anything else HOT 11
- Out-Of-Band (OOB) flow
- FEATURE REQUEST: Hooks into `eventTypes` (e.g. "Out of Office" or "Focus Time")
- "Something went wrong" google error when setting up oauth 2.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcalcli.