Giter VIP home page Giter VIP logo

Comments (12)

tresni avatar tresni commented on August 16, 2024

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.

insanum avatar insanum commented on August 16, 2024

Bummers... when I saw the closed notification I thought you implemented this! :-)

from gcalcli.

insanum avatar insanum commented on August 16, 2024

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.

insanum avatar insanum commented on August 16, 2024

Working on this and almost complete.

from gcalcli.

fsrc avatar fsrc commented on August 16, 2024

Awesome! Looking forward to it!

from gcalcli.

jmburges avatar jmburges commented on August 16, 2024

Has this been implemented in v3 yet?

from gcalcli.

insanum avatar insanum commented on August 16, 2024

Work has started but it is not complete yet.

from gcalcli.

tresni avatar tresni commented on August 16, 2024

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.

pekcheey avatar pekcheey commented on August 16, 2024

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.

pekcheey avatar pekcheey commented on August 16, 2024

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.

nealmcb avatar nealmcb commented on August 16, 2024

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.

jcrowgey avatar jcrowgey commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.