WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] - The settings for a 1000 pages site (6 posts)

  1. duda
    Member
    Posted 1 year ago #

    Hello everybody,

    The site on which I use W3TC, has around 1000 pages of content. I have around 50 categories and 950 posts. The posts need to be updated(cached again) once each 2 days. But homepage and categories need to be cached everytime a new posts is made - and I do 10 posts per day. I also need everything to be cached all the time.

    I would like to set the plugin up correcly and to understand how it works.

    But the most important question is: After the cache of a page experies and it is taken by garbage collection module, will the new version of page's cache be automatically recreated?

    Here is what I have done so far:
    I set cache experies to 100 000 seconds.
    I set garbage collection interval to 10 000 secs.
    I disabled database cache.
    I disabled page cache.
    On purge cache - I selected Home Page and Daily archive pages.

    I am not sure does this work in the way i descibed bellow. Once a page is cached, it experies after (100 000 + 10 000 seconds in this case), the garbage collection section is going to delete the cached pages in question. So all the 1000 page's cache is going to be deleted after 110 000 seconds and home/category page is going to be deleted once new post is published.

    Regarding cache preloading, will it preload the cache for pages that are already cached? For example will it preload any more pages if I set it to 1000 per 1000 seconds and but all pages of the site are preloaded.

    What other setting should i use in this case?

    Thanks very much.

    Note to moderator: - I created this thread because the first one was inproperly formated. Please delete that and keep this one.

  2. duda
    Member
    Posted 1 year ago #

    Also what do i do if i want affiliate links generated by a plugin, which is called from the post using a shortcode - like
    [getlink keyword="apples"].

    I have read the example, but i do not know which one to appply.

    Example 1:
    <!-- mfunc any PHP code --><!-- /mfunc -->
    Example 2:
    <!-- mfunc -->any PHP code<!-- /mfunc -->
    Example 3:
    <!--MFUNC -->
    echo rand();
    <!--/mfunc -->
    Example 4:
    <!-- mclude path/to/file.php --><!-- /mclude -->
    Example 5:
    <!-- mclude -->path/to/file.php<!-- /mclude -->
  3. bheadrick
    Member
    Posted 1 year ago #

    I think you might have to edit the code that runs the shortcode in order to apply the mfunc stuff, but you could try example 3 around the shortcode. Just make sure to add it in the html view, and not in the wysiwyg - also, never ever ever switch to visual when you use this or wp will strip the mfunc stuff out of the content.

  4. bheadrick
    Member
    Posted 1 year ago #

    you can't set a different expiration time by post type, but the default values will refresh the homepage and blog page each time a post is added or edited. If you want category pages to do this as well, that's the "term pages" under purge policy.

    I'm not totally sure about the preloading - whether it skips pages that are already cached or not.

    Also, 100k seconds is just over a day. if 2 days is what you want, make it 172800.

  5. duda
    Member
    Posted 1 year ago #

    Thanks bheadrick.

    I find that the built in preloading, as well as generate preload do not work, they do not cache pages automatically.

    Is there any other way to preload cache automatically?

    I use a windows based software to visit each page on my site. This is the only way I know to cache a site. But i have to redo this every 2 days which isn't ideal.

  6. bheadrick
    Member
    Posted 1 year ago #

    I'm not sure why that would be. Are you sure it has the correct path to your xml sitemap?
    I have other issues with w3tc page caching, and I use quick cache for page caching. You may want to try that if you cant get w3tc page caching preloading functional.

Topic Closed

This topic has been closed to new replies.

About this Topic