All Events Display on Map

Home Forums Calendar Products Events Calendar PRO All Events Display on Map

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1359138
    John Delaney
    Participant

    Hi! I’m using Nico’s great little code snippet from here – https://theeventscalendar.com/support/forums/topic/how-to-get-all-events-to-show-in-map-view-without-all-events-being-listed-below/#post-991443 – and wondered what the downside to running the code with and without the caching is on a live environment. We obviously want all users to see all events (especially those who check the list regularly), so we want to make sure we’re not losing some due to cache, but at the same time we don’t want page load times to be crazy slow, if that’s the reason for calling things from cache.

    Any assistance to the pros/cons would be appreciated.

    Thanks!

    Dean

    #1359828
    Barry
    Member

    Hi there, Dean.

    what the downside to running the code with and without the caching is on a live environment.

    A lot depends on how many events you have, if you already have a persistent caching layer in place and other factors relating to your hosting environment … so it’s hard for us to give you a definitive answer here.

    What I’d suggest then is measuring the difference: look at how it behaves with caching, then do some further benchmarking without caching. Remember also that it’s not necessarily a choice between caching and no caching — for instance you could replace the following code from the snippet:

    set_transient( 'all_geo_markers_store', $markers, DAY_IN_SECONDS );

    With something like this, which will set it to expire a whole lot sooner:

    set_transient( 'all_geo_markers_store', $markers, HOUR_IN_SECONDS );

    With that sort of approach you could still benefit from transient-based caching but keep things reasonably fresh at the same time 🙂

    #1360088
    John Delaney
    Participant

    Excellent. Thanks! We’ll try setting the time to an hour and see what that does. Now that I know where to adjust things it should be easy to make adjustments as needed.

    #1361214
    Barry
    Member

    Awesome!

    #1372244
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘All Events Display on Map’ is closed to new replies.