Skip to content
Discussion options

You must be logged in to vote

need i to create cache item class for each entity? if yes, we will have many object map work. the automapper module should be import to domain project?

  • I think it's better to define cache item classes. (Example: BookCacheItem class from Caching documentation) Because by doing this you can cache certain values and get the other values from the database. (And I think it's also good for the SOC perspective)
  • You don't need to import the AutoMapperModule to your domain module. Your domain module should not depend on it. You can make the related mapping configurations from the application layer.

what is the best practice to cache aggregate root?

  • Defining a cache item class and only inclu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yqszt
Comment options

@EngincanV
Comment options

Answer selected by EngincanV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants