Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • skiltz 501 posts 701 karma points
    Feb 05, 2011 @ 15:25
    skiltz
    0

    How not to cache?

    With the builtin Umbraco caching features how do you NOT cache when your usercontrol doesn't return the desired result?

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Feb 06, 2011 @ 16:03
    Chris Houston
    0

    Hi Skitz,

    I am not sure I follow this, surely the question should be how can you fix your user control to return the desired result?

    If for some reason your user control does not always return your desired output, maybe your ownly option is to turn off the Umbraco cache for this user control.

    Can you give an example senario of what you are trying to achieve?

    Cheers,

    Chris

  • David Verberckmoes 46 posts 77 karma points
    Feb 07, 2011 @ 16:46
    David Verberckmoes
    0

    Skiltz,

    Check the "Cache period" in the macro if it is set to "0" (zero)

    Rgds,

    David#

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Feb 07, 2011 @ 16:51
    Chris Houston
    0

    @David

    From my understanding Skiltz wanted to not cache the results in the senario that his UserControl did not return the results he was expecting, so in other words having some logic to determine whether or not to cache, Skiltz can you confirm?

    Cheers,

    Chris

  • skiltz 501 posts 701 karma points
    Feb 07, 2011 @ 19:36
    skiltz
    0

    Example is I pull latest wall posts from Facebook.  If for some reason facebook is down then nothing will be returned, however umbraco will still cache the usercontrol.

  • skiltz 501 posts 701 karma points
    Feb 07, 2011 @ 19:52
    skiltz
    0

    The answer is probably just to use my own caching logic, then I can check the cache to see if holds a value :) So all good no need to worry :)

    Also in the above example I don't really want Umbraco to clear this cache when a node is published, which currently it would do so thats another bonus of using you own caching logic.

  • David Verberckmoes 46 posts 77 karma points
    Feb 08, 2011 @ 10:15
    David Verberckmoes
    0

    When you use your own cache you can also implement a "backup", i.e. get a previous version from the filesystem

Please Sign in or register to post replies

Write your reply to:

Draft