• I need to enable caching and found this plugin. I am currently using s2member Pro as well. If the solution is in Quick Cache Pro, I have no problem paying for it. With that in mind …

    I have added Quick Cache on a dev site and everything is working except for my videos. I have a custom plugin managing videos that uses Kaltura. I use wp_localize_script to pass variables (granting permission to view video) to the js to embed based on the variables. The problem is with the variables getting passed are being cached. The ‘session id’ for Kaltura could be expired. Is there a way to avoid this? I have a feeling I am just not thinking correctly on how to accomplish this.

    https://wordpress.org/plugins/quick-cache/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Raam Dev

    (@raamdev)

    Hello,

    I’m not really clear on how you’re using Kaltura. Are you using wp_localize_script() inside the post where the video is (in conjunction with a plugin that allows you to place PHP code inside a post)?

    When you say everything is working except for your videos, what does that look like? Do the videos not load? Are the proper permissions not being detected?

    A few more details would be helpful to troubleshoot this issue. 🙂

    Thread Starter VGJ

    (@vgj)

    I have a custom template for a custom post type. It currently calls a function that returns everything needed to embed the player (including external js for player controls and js snippet to embed with variables). Since the current way is getting cached, I have since tried to use wp_localize_script to include the snippet with the variables. But it outputs to the page so it will get cached as well.

    The main variable I am worried about is the Kaltura Session ID. It is a session id that can be unique to the user and has various expires. We currently have a paid membership and paid rental options.

    The player is fine and works. But since it is cached, the cache version may go beyond the rental period of 2 days. For a membership, it really does not matter except when the id does expire or the member cancels his/her membership it needs to be updated immediately.

    Thread Starter VGJ

    (@vgj)

    Any and all help would be appreciated.

    Plugin Author Raam Dev

    (@raamdev)

    If you’re running a membership site, or any site where users login, I recommend setting Quick Cache to maintain a separate cache for each user, that way session IDs and other information relevant to a specific user don’t end up getting cached and served to other visitors.

    The Lite version of Quick Cache doesn’t have the option to maintain a separate cache for logged-in users, but Quick Cache Pro does have this option. Please see the screenshot of the Logged-In Users option panel here: https://github.com/websharks/quick-cache/wiki/Plugin-Options#logged-in-users

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Caching localized data for js’ is closed to new replies.