We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1099
    • 34 Posts
    Hi all

    I’m working on an snippet that will change a resource tv. Everything is Ok, But when i use this snippet to change my tv value, document cache make a problem. No change in showing that tv except i manually clear cache using Modx manager. Now is there any way like using API to clear only that resource cache?

    thx
      [IMG]http://i12.tinypic.com/63sd4kk.png[/img]
      The First Iranian Aquarium Forum
      www.ALiaqua.com
      The First Iranian Aquarium Magazine
      www.Aliaqua.com
    • You can refresh the entire cache or specific parts of it, but not just a single Resource. If you change cacheable data that is rendered on a cacheable Resource, you need to refresh the entire cache, otherwise, make the Resource non-cacheable or the specific TV tag you want to see changed values from.
        • 1099
        • 34 Posts
        Hi

        Thx OpenGeek

        So how clear entire cache or resources cache using an snippet?

        thx
          [IMG]http://i12.tinypic.com/63sd4kk.png[/img]
          The First Iranian Aquarium Forum
          www.ALiaqua.com
          The First Iranian Aquarium Magazine
          www.Aliaqua.com
          • 34170
          • 6 Posts
          $modx->executeProcessor(array(
          'location' => 'system',
          'action' => 'clearCache',
          ));

          user must have context access to clear cache...