• Resolved osvaldo0123

    (@osvaldo0123)


    Hello, I have a small inconvenience
    if I have a category called
    Entertainment
    and subcategory called
    cinema
    music
    entertainment
    Etc.
    When I publish something in cinema the entertainment cache is not updated and vice versa too

    The page I need help with: [log in to see the link]

Viewing 15 replies - 16 through 30 (of 35 total)
  • Thread Starter osvaldo0123

    (@osvaldo0123)

    In the image, as you can see, the names of the category are not changed, but when you make the error, you do change it.

    Plugin Contributor iSaumya

    (@isaumya)

    Copu paste the following code exactly and then change the path of your category pages:

    add_filter( 'swcfpc_post_related_url_init', function( $listofurls ) {
    	// Some items that will always be added to the related listofurls
    	$listofurls = [ 
    		get_home_url( null, '/category/entertainment/' ), 
    		get_home_url( null, '/category/some-category/' ),
    		get_home_url( null, '/category/some-other-category/' )
    	];
    
    	return $listofurls;
    } );

    The mistakes you made was:
    1. forgot to add the starting { after the function declaration and you also called $postID without actually using it.

    Use the above mentioned code and it will work.

    Thread Starter osvaldo0123

    (@osvaldo0123)

    https://ibb.co/B24J8y7
    put this in this form and my site doesn’t work, what it does is it throws the above error but now it won’t let me use the website

    • This reply was modified 3 years, 10 months ago by osvaldo0123.
    • This reply was modified 3 years, 10 months ago by osvaldo0123.
    Plugin Contributor iSaumya

    (@isaumya)

    You did not added comma after each element in the array:

    Screenshot: https://i.imgur.com/la5azhq.jpeg

    Thread Starter osvaldo0123

    (@osvaldo0123)

    If I really realized that the error was mine when placing the code, then I proceeded to copy the code intact and it worked and from then on I realized that the error was mine

    Thread Starter osvaldo0123

    (@osvaldo0123)

    It didn’t really work so I tell you the following

    post something on
    https://elprofeshow.com/category/entretenimiento/farandula/
    and did not appear in
    https://elprofeshow.com/category/entretenimiento/

    I can only verify that the cache was updated
    https://elprofeshow.com/category/entretenimiento/farandula/`

    • This reply was modified 3 years, 10 months ago by osvaldo0123.
    • This reply was modified 3 years, 10 months ago by osvaldo0123.
    Thread Starter osvaldo0123

    (@osvaldo0123)

    Will it import the purge method for example by curl etc ?

    Plugin Contributor iSaumya

    (@isaumya)

    Is it supposed to show on the first page of https://elprofeshow.com/category/entretenimiento/ or in any pagination pages? Cause you added the first page path to the code not any pagination page path.

    Thread Starter osvaldo0123

    (@osvaldo0123)

    Well, I’ll tell you that it took me a while to write again because it seems to work correctly, because it seems to take a while to work, I made about 4 posts confirming and it didn’t work, but after a while I noticed how it’s doing what I need

    Thread Starter osvaldo0123

    (@osvaldo0123)

    I have another small inconvenience and that is that I use varnish on the server and when I thumb the cache when I publish something it shows me some errors which I consider should be resolved by increasing the cache deletion delay per queue,
    Do you suggest that I make another ticket or do we approach it for this one?

    Plugin Contributor iSaumya

    (@isaumya)

    I have another small inconvenience and that is that I use varnish on the server and when I thumb the cache when I publish something it shows me some errors which I consider should be resolved by increasing the cache deletion delay per queue,

    – That might be the reason behind all of these problems you are facing. Technically you can use varnish but I will highly not recommend it. It won’t help much just create many wired issues. It is never recommended to use more than one page caching system on a single site. When using this plugin you are using much advanced level of caching compared to Varnish – where varnish is a disk level cache now you are using CDN level cache.

    Anyways, here’s my recommendation. delete varnish and inside Cloudflare dashboard enabled Tiered Cache. It will help a lot.

    Also if you would like to have longer cache, you can also try the new Cache Reserve feature – https://blog.cloudflare.com/introducing-cache-reserve/

    These will help more than Varnish.

    Thread Starter osvaldo0123

    (@osvaldo0123)

    Looking for information I found yesterday the same one you gave me and I proceeded to do it, remove varnish and enable the plugin’s disk cache, thank you very much I think everything is excellent for the moment

    Plugin Contributor iSaumya

    (@isaumya)

    If you have good amount of traffic you don’t even need the plugin’s disk cache. If you have tiered cache enabled and cache reserve active (probably) you can even disable the plugin level disk cache and the live on the CDN cache.

    If you like the plugin, please do consider sharing a review in the review section.

    Thread Starter osvaldo0123

    (@osvaldo0123)

    Well, actually I only speak Spanish and the translation is eating me hehehe
    Could you tell me what is the level cache?

    Plugin Contributor iSaumya

    (@isaumya)

    There is no level cache. I said that if you have good amount of traffic you don’t have to enable fallback cache inside the plugin settings.

    Cause if you have enabled Tiered Cache inside Cloudflare dashboard and if you have also got the Cache Reserve inside Cloudflare dashboard, you can basically just live off the CDN level cache and no need for any other disk-level caching system.

Viewing 15 replies - 16 through 30 (of 35 total)

The topic ‘update cache with subcategory’ is closed to new replies.