Base solution for your next web application
Open Closed

Redis Caching #11792


User avatar
0
jtallon created

Hi, Is there any more information regarding caching with Redis? I'm following this guide here but there is no information on what layers they dtos etc should live https://aspnetboilerplate.com/Pages/Documents/v2.0.0/Caching

Any help appreciated.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @jtallon

    Aer you using v2.0 of AspNet Boilerplate ? If not, you can follow https://aspnetboilerplate.com/Pages/Documents/Caching#redis-cache-integration.

    This document only explains how to enable Redis. For DTOs, you can keep them in Application.Shared project. If you have any other questions, let me know.

  • User Avatar
    0
    jtallon created

    Thanks, We're using aspnetzero . I ended up placing the Dtos in that shared project as it made most sense. Thank you.

    From my understanding of the documents, a new Dto is needed for each entity we want to cache. Is that correct?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes, it is not suggested to cache entities because of possible serialization problems. But, you can still cache entities if you need to.