• Resolved eljara

    (@sawasblog)


    Hi first of all i would like to thank you for this great plugin that made my blog much faster.

    Now, i would like to create a custom end point that trigger deleting cache for a specific object type , for example every time a user likes a comment the “notification” object type must be flushed .

    I hope there will be a simple function that i can put in my function theme file and call every time ” my liking function ” is called

    thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Richard Korthuis

    (@rockfire)

    Hi @sawasblog

    Thank you for using our plugin!

    What you want is easy 🙂 Simply add the following code at the end of your “my liking function”:
    \WP_Rest_Cache_Plugin\Includes\Caching\Caching::get_instance()->delete_object_type_caches( 'notification' );

    Please let us know if this works for you or if you have any other questions!

    Awesome, I was looking for this too!

    Plugin Author Richard Korthuis

    (@rockfire)

    Hi @menathor

    Great! Please let us know if you need any more help!

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

The topic ‘How to delete specific object type cache programmatically’ is closed to new replies.