WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] How to bypass the cache ? (3 posts)

  1. Ishko
    Member
    Posted 1 year ago #

    Hello,

    Thanks for the very nice work on YARPP.

    I have problems with a website using last version of WPML and last version of YARPP. Related posts are messy in foreign languages, as described by other users.

    A fast solution for me would be to bypass the cache - this is a small website with few visitors - but I can't figure how to do it.

    If I use "define('YARPP_CACHE_TYPE', 'bypass')" in wp-config.php, then I have a PHP error : the required file cache-bypass.php doesn't exist. I can create it but don't know which code I should include in.

    Can you explain me the nice way to bypass cache ?
    Thanks by advance !

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. Ishko
    Member
    Posted 1 year ago #

    Well,

    I managed to test bypass method.
    (line 29 of class-core.php changed to : $this->cache = new YARPP_Cache_Bypass( $this ); )

    Bad. Every articles of all post types are displayed as related items. The same result can be obtained by using the "postmeta" cache method.
    In default language : no problem, never.

    Flushing the cache before displaying the items seems to resolve the display problem.

    In the file class-core.php, just after line 919 :

    function display_related($reference_ID = null, $args = array(), $echo = true) {

    add :

    $this->cache->flush();

    Then everything is ok with cache flushed. If the cache has already been saved in the database for the post, it breaks.
    Then YARPP works well with WPML, with cache-table method only, and only if cache is empty at the start of the process.

    Could the problem just rely on the table-cache save process ? Maybe a "simple" solution could be found, but without a good knowledge of YARPP nothing is simple...

  3. Ishko
    Member
    Posted 1 year ago #

    I mark as resolved, initial question is resolved in my case (bypass cache). I add my other question in an already existing post about WPML :
    http://wordpress.org/support/topic/yarpp-and-wpml-not-showing-on-second-language?replies=14

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic