Skip Navigation

[Resolved] View Slider and Pagination cache

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to understand more about the caching mechanism in slider Views.

Solution: In a slider View, caching pages stores the contents of each page in memory while the User remains on the current page. Pages are delivered one by one so one page of results requires one AJAX call, two pages require two AJAX calls, and so on. Caching does not store the contents of each page in memory across page loads or refreshes. When you choose to preload next and previous pages, an individual AJAX request is triggered for each of those pages when the slider initially loads. If multiple AJAX requests are causing the initial load time to be unreasonable, I would consider turning off the Preload next and previous pages option, and/or the caching option. This will cut the number of AJAX requests that must be completed before the first page can transition to the next page, speeding things up at first. However it may also slow things down during transitions between pages later, so it's a bit of a trade-off.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by COOP2016 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#955569

I've created a hero slider in my site using Toolset Views.

The slider works fine.....but..

As Views hooks into the admin-ajax.php, it seems to be making lots of requests to the server.
I currently have 3 calls to admin-ajax.php on the pages where the slider sits.

( I imagine 2 for the slider and 1 for the pagination. I could be wrong )

It looks to me like when the page loads, a query is made to the DB that serves up the items in the slider. When they start to transition,......... on each transition, an http request is made, so if the silder is set to transition every 5 seconds, that means an http request every 5 seconds.

I've read the documentation on caching views, but I can't see where this can be done in the silder view.

Also, in the pagination options, I can see cache pages and pre-load next and previous pages.

The documentation is not clear on what the cache pages does. I have it ticked but donno what its doing or if it's doing anything.

Any information will be appreciated.

Many thanks.

#955630

In a slider View, caching pages stores the contents of each page in memory while the User remains on the current page. Pages are delivered one by one so one page of results requires one AJAX call, two pages require two AJAX calls, and so on. Caching does not store the contents of each page in memory across page loads or refreshes. When you choose to preload next and previous pages, an individual AJAX request is triggered for each of those pages when the slider initially loads. If multiple AJAX requests are causing the initial load time to be unreasonable, I would consider turning off the Preload next and previous pages option, and/or the caching option. This will cut the number of AJAX requests that must be completed before the first page can transition to the next page, speeding things up at first. However it may also slow things down during transitions between pages later, so it's a bit of a trade-off.

#957133

Thanks for the response. Your explanation has helped me decide the way forward.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.