Copied to clipboard

Flag this post as spam?

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


  • Paul de Quant 403 posts 1520 karma points
    Jan 25, 2021 @ 16:30
    Paul de Quant
    0

    Hi.

    I'm currently using AppCaches.RuntimeCache.Insert to cache a few objects. Can someone confirm if this type of cache only exists for the specific user visiting the site or all users i.e. is this a cache for individuals or is it cached across the board.

    Example: User 1 visits the site (object caches), User 2 visits the site also see newly cached object from when User 1 looked at it).

    Hope this makes sense

  • Markus Johansson 1911 posts 5757 karma points MVP c-trib
    Jan 25, 2021 @ 21:09
    Markus Johansson
    101

    The runtime cache is shared for the ”runtime”, so anything stored in this cache will be shared for all requests.

    You could store user specific info if you need but you would need a user-dependent key.

    Like userInfo-1, userInfo-2 where 1 and 2 could be the user id.

    The “request cache” will only live for the duration of a request like using Request.Items, this cache would be request/user specific.

    Not sure if this is what you asked?

  • Paul de Quant 403 posts 1520 karma points
    Jan 26, 2021 @ 15:25
    Paul de Quant
    0

    Hi Markus,

    Thanks for this - answers my question perfectly.

Please Sign in or register to post replies

Write your reply to:

Draft