• Resolved bzweic

    (@bzweic)


    thanks for your wonderful plugin. i have a problem with the hdd caching and the filter cachify_modify_output. if i add this to my functions.php, no more cached files are being saved in the cache directory. i need to modify the output because of security reasons (disable relative protocol urls).

    regards, rayaan

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Rayaan,

    thanks for reporting this. I guess you have added something close to our doumentation.

    Looks like the documented example is incorrect and triggers an error:

    Too few arguments to function … 1 passed in … and exactly 4 expected

    Depending on your use case, either remove the additional parameters or add the number of arguments explicitly (default is 1, we support up to 4).

    add_filter(
    'cachify_modify_output',
    function( $data, $method, $hash, $cache_expires ) {
    return $data . '<!-- additional comment line -->';
    },
    10, // priority (default: 10)
    4 // number of arguments (default: 1)
    );

    or

    add_filter(
    'cachify_modify_output',
    function( $data ) {
    return $data . '<!-- additional comment line -->';
    }
    );

    Cheers,
    Stefan

    Thread Starter bzweic

    (@bzweic)

    Hi Stefan.

    Thank you very much for your quick answer, now its working…

    Regards from Stuttgart,
    Rayaan

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘cachify_modify_output not working’ is closed to new replies.