• Hi.

    Hey,

    The plugin works great — no complaints at all. I just have a scaling question.

    I’m running a WooCommerce store with ~5,000 products and ~10,000 total pages. Products are updated almost daily (price, stock, content), and the client requires changes to be visible immediately — even in incognito.

    Right now, the only way to guarantee that is to clear the entire cache. But when I do that:

    • All cache is wiped
    • Preload has to rebuild ~10k pages
    • Site is slower until preload finishes
    • Then another update happens… and repeat

    Some updates are product data (price/stock), others are layout changes in the builder. If cache isn’t cleared fully, visual bugs appear due to CSS/minified assets.

    Currently I use custom code that detects changes and clears everything (including minified CSS), because tracking specific affected URLs is difficult — many pages are dynamic.

    My question:

    Is there a way to:

    • Keep existing preload/cache intact
    • Only invalidate affected pages when content changes
    • Clear/regenerate CSS assets when needed
    • Avoid fully wiping the entire cache every time

    Basically:
    Can preload remain available while only specific pages regenerate on next visit, instead of destroying the entire warmed cache?

    Would appreciate any architecture suggestions or best practices for large WooCommerce stores with frequent updates.

    Thanks.

    My basic code is this:

    /**

    • Clear WP Fastest Cache + Minified CSS/JS
    • When a post is created, updated, or deleted
      */
      function auto_clear_wpfc_cache_with_minified( $post_id ) { // Prevent autosave / revisions
      if ( defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE ) {
      return;
      } if ( wp_is_post_revision( $post_id ) ) {
      return;
      } // Make sure WP Fastest Cache function exists
      if ( function_exists( ‘wpfc_clear_all_cache’ ) ) {
      wpfc_clear_all_cache( true ); // TRUE = also clear minified CSS/JS
      }
      }

    // Trigger on save/update
    add_action( ‘save_post’, ‘auto_clear_wpfc_cache_with_minified’ );

    // Trigger on delete
    add_action( ‘deleted_post’, ‘auto_clear_wpfc_cache_with_minified’ );

    Regards,

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Emre Vona

    (@emrevona)

    Hi, I could not understand why you clear all cache after updating a post.

    Thread Starter snakecharmer95

    (@snakecharmer95)

    I felt that was required as otherwise things would not update in correct time when posts were scheduled or the sale price of product was set using a schedule it would take too long.

    Do you have a solution for that scenario?

    Thread Starter snakecharmer95

    (@snakecharmer95)

    Yeah I just tested it without that custom function the CSS is mesesd up and I am forced to clear all minified css anyway so that is why I am asking for a better solution if applicable.

    Plugin Author Emre Vona

    (@emrevona)

    I still don’t understand the relation between updating a post and changing the CSS.

    Hi.

    Because when a page is updated inside builder the css is messed up unless css is cleared. That is why I have to clear it.

    Plugin Author Emre Vona

    (@emrevona)

    In this case, you need to clear all cache with the minified sources. The solution you found is absolutely correct.

    Thank you for confirming my suspicion.

    Then I shall ask next.

    I assume I could simply speed everything up by just precaching more pages at once than 4.

    Is there like a standard that you have if we have 8GB ram and 8CPU cores that we could go for lets say 20 or 40 or somethin crazy like that to speed up the process?

    Besides that is there anything else I could adjust to speed up the creation of new process?

    Plugin Author Emre Vona

    (@emrevona)

    I recommend speeding up the preload feature by adding a cron job as shown below, instead of increasing the number too much.

    https://www.wpfastestcache.com/features/preload-settings/#how-to-speed-up-manually

    Thread Starter snakecharmer95

    (@snakecharmer95)

    Thank you.

    I have powerful servers and dedicated with 8gb ram minimum and 4 cpu cores so I went with 12 pages and running on server cron 2 times every minute and it seems the performance is barely using 5% of cpu and almost no ram so it should be alright.

    Best of regards!

    Plugin Author Emre Vona

    (@emrevona)

    you can increase it to 20.

    Thread Starter snakecharmer95

    (@snakecharmer95)

    What about caching parameters?

    Is that an option to select the parameter name such as ?_something and then set it to be cached?

    I do not have a problem with caching it since its a ajax filter and it would speed up those pages as well.

    Regards

    Plugin Author Emre Vona

    (@emrevona)

    Please take a look at the following tutorial.

    https://www.wpfastestcache.com/tutorial/cache-url-with-querystring/

    Thread Starter snakecharmer95

    (@snakecharmer95)

    This is brilliant caching mechanism.

    Its too good to be true atm.

    We had so many issues with expensive caching and adjustments and this one takes 1/3 the time to adjust and just works for now.

    Fabulous work.

    Cheers.

    Thread Starter snakecharmer95

    (@snakecharmer95)

    Alright now I have follow up question.

    Is there a way now to exclude commong garbage param and spam?

    Such as generated by seo/spam crawlers?

    Or is there a way to cache specific ones because in tutorial it only says to enable it globally ON or disable it globally OFF nothing to enable it querry specific.

    Cheers again!

    Plugin Author Emre Vona

    (@emrevona)

    you can exclude any page as shown below.

    https://www.wpfastestcache.com/features/exclude-page/

Viewing 15 replies - 1 through 15 (of 23 total)

You must be logged in to reply to this topic.