• muhmentz

    (@muhmentz)


    Hi, this plugin has been super useful. I have one desperate issue, however, i cannot export pages that requires you to be logged in …i can only export that that requires loggout out by default…i would really love a way to make it work the way i need it to.,..that is, I need to be able to export pages that requiers you tobe liogged in as well..

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rajin Sharwar

    (@rajinsharwar)

    Hi @muhmentz, unfortunately as of now, the HTML caching will only work for logged-out users. HTML caching is completely disabled for logged-in users, whcih means if you have pages that require users to login, it won’t cache the HTML of those pages.

    Initially, I had the plan to make the plugin compatible for logged-in users as well. But later I realized, it’s going to conflict with a lot of plugins and features if I do so. For example, as these pages will be served from an HTML cache, the user won’t see anything dynamic on his end, all will be just simple static assets. That’s the reason, unfortunately, I am unable to make this work for logged-in users. Thanks for your feedback though, I will take a further look later.

    Thread Starter muhmentz

    (@muhmentz)

    Hello Rajin! Thanks for your prompt response. I do understand now. I can say for sure that there’s no other plugin that does what I need better than yours. I’m pretty much out of options. Im building can Saas that comprises of just html css and js with an external bot library that acts as my backend. My intention is to be completely independent of wp so I don’t need dynamic posts. For wp devs like me that just use wp to develop and want to export code, I think a checkbox to enable this functionality in settings would be great just as much as we already have settings for other functions, this one can be enabled or disabled at will adding the note that indicates the lack of other functionalities while export while logged in is enabled. This would be a lifesaver I think.thsnks again

    Plugin Author Rajin Sharwar

    (@rajinsharwar)

    Thank you so much for your suggestion. Yeah I will be surely checking on it, maybe if not a option, I am thinking of introducing a filter, which one can use to include the logged in users in the cache as well.

    Thread Starter muhmentz

    (@muhmentz)

    Hi again, Rajin, that would be the best implementation considering your initial concerns. Looking forward to reaching back out to you. Best regards

    Plugin Author Rajin Sharwar

    (@rajinsharwar)

    Hi @muhmentz, thank you so much for your suggestions. I have been a bit busy lately so I couldn’t get back here on this. I am thinking of adding this feature, but not sure about how quick it will be. But I will post here as soon as that happens. If you need this feature urgently, you can send me a message from the plugin’s Support tab, and I will get back to you via email.

    Thank you again for your feedback. ??

    Plugin Author Rajin Sharwar

    (@rajinsharwar)

    Kindly update to new version 2.4. I have introduced two filters “serve_static_enable_logged_in” and “serve_static_logged_in_role” to enable cache for logged-in users.

    Use “serve_static_enable_logged_in” filter to enable cache save as a logged-in user. By default as an Administrator.
    Example:

    add_filter( 'serve_static_enable_logged_in', function( $value ) {
    return true;
    } );

    Use “serve_static_logged_in_role” filter to change the type of user used to generate the cache as logged-in. This filter won’t work if you don’t have the used the “serve_static_enable_logged_in” filter already. By default, it’s value is Administrator.
    Example to change the cache generation as a logged-in Subscriber user:

    add_filter( 'serve_static_logged_in_role', function( $value ) {
    return 'Subscriber';
    } );

    Check this link to find the Text’s you can use. Not applicable if you have custom User role: https://www.ads-software.com/documentation/article/roles-and-capabilities/#summary-of-roles

    Just a headsup, this will only work when you are manually generating the cache from the Cache Generator.

    Thread Starter muhmentz

    (@muhmentz)

    you can imagine my surprise finding this in my inbox when I was winding down for the day…thanks for this update….works flawlessly. Do you have roadmaps?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.