How have full control of caching page of Add Listing page

This topic contains 8 replies, has 3 voices, and was last updated by  Kiran 4 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #541495

    Brigitte
    Full Member
    Post count: 235

    Hello,

    Please I really need the freedom to cache the Add Listing page. I accept the consequences if this causes problems on my site, but I would like to have a choice.

    I control each of the pages created on the site. Besides, I don’t want to activate all the cache features but essentially a simple HTML minification for all pages that are not included by default in the cache. (add listing form page and woocommerce pages).

    Please tell me how I can cache the add listing page. I thought that GeoDirectory applies the constant “DONOTCACHEPAGE” but apparently it is not that.

    #541509

    Alex Rollin
    Moderator
    Post count: 27815

    I will ask the developers to take a look at your question.

    #541813

    Kiran
    Moderator
    Post count: 7069

    Hello Brigitte,

    Add listing page is dynamic page so it must be exempted from caching.

    Kiran

    #542069

    Brigitte
    Full Member
    Post count: 235

    Thanks for your reply Kiran. Have you read my message? Because I am aware that this is a dynamic page. Besides, I don’t want to cache this page, but only minify the HTML code for more security & confidentiality. Thank you in advance for your help.

    #542137

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Add listing page is prevented from cache so it has defined some variables on add listing page. See https://github.com/AyeCode/geodirectory/blob/master/includes/core-functions.php#L415

    Kiran

    #542216

    Brigitte
    Full Member
    Post count: 235

    Thank you for this information Kiran.

    If I deactivate the caching of the Add Listing page with my cache plugin (WP-Rocket), can I then comment on this line, or will it generate a bug?

    geodir_maybe_define( 'DONOTCACHEPAGE', true );

    Thanks.

    #542293

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #542320

    Brigitte
    Full Member
    Post count: 235

    Are you sure there is no “anti-cache” procedure for the Add Listing page? Because I deactivated DONOTCACHEPAGE from “core-functions.php“, and that doesn’t change anything, the Add Listing page is definitely not in caching on the site (the only page not cached!)

    //geodir_maybe_define( 'DONOTCACHEPAGE', true );

    Even stranger, I even disabled the full “geodir_nocache_headers” function from “class-geodir-template-loader.php“:

    } elseif(geodir_is_page( 'add-listing' )){
    
    	// the add listing page should never be cached
    	//geodir_nocache_headers();

    I promise you that this is the last question on this subject because I am aware that you are not dealing with specific user customizations. I would just like to know if there are not other functions which prevent the caching of the Add Listing page.

    This is to be sure that I must do research outside of GeoDirectory.
    Thanks.

    #542326

    Kiran
    Moderator
    Post count: 7069

    Hello,

    In GeoDirectory only a function geodir_nocache_headers() defines DONOTCACHEPAGE variable, apart from this not any places it defined.

    Please try to disable non GD plugins to check from where DONOTCACHEPAGE is defined.

    Which caching system are you using? Make caching system do not have custom code related to these.

    Thanks,
    Kiran

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket