More aggressively cache/pre-fetch events from AJAX calls
See original GitHub issueOriginally reported on Google Code with ID 1822
Hello,
Maybe I understand lazyFetching wrong or I remember it working wrong, but from what
I recall if I had this lazyFetching set to true (by default) and switched weeks in
weekAgenda view, calendar fetched each week only once. Right now it fetches weeks all
the time (when I switch back and forth). Shouldn't it keep events in memory?
Kind regards,
Mike
Reported by koniczynek
on 2013-05-04 19:58:51
Imported with 8 stars.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:9 (7 by maintainers)
Top Results From Across the Web
How to avoid too many ajax calls and cache json data on the ...
I have a calendar application and it loads all of the event data using ajax and json results. the issue is that i...
Read more >5 Ways to Improve Your Ajax Performance - Peachpit
The first goal isn't to cut out all Ajax requests, but the unnecessary ones. Or, if you want to be aggressive, also cut...
Read more >Ajax Events | jQuery API Documentation
Ajax requests produce a number of different events that you can subscribe to. Here's a full list of the events and in what...
Read more >Handling Sequential AJAX Calls using jQuery
There is a requirement to make multiple AJAX calls parallelly to fetch the ... callback functions based on zero or more Thenable objects, ......
Read more >What can go wrong if you make synchronous Ajax calls using ...
Synchronous API call means Javascript thread will stop further execution of ... The answer lies in how Event loop handles task (callback) and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
could I suggest an implementation such as having a lazyFetchDays: paramater that fetches x days ahead and behind the current, that way scrolling between days becomes smoother because the cache already has the days prefetched. You would probably set the default to 0 days just so as not to change behaviour
I have written my own caching method to get around this limitation, its pretty simple to implement in your code, I haven’t quite written the initial bit which aims to pull the event data from the page to speed the initial load. Then it does an ajax request and stores the results for the rendered day +/- 3 days in the cache, further calls to the method hut the cache first and also trigger a reload of the cache advancing it along so you always have a buffer of three days to supply to the calendar. This is appropriate for my needs…hope it helps others too. PS sorry its in coffescript the autotranscribed js was ugly