piranha.core icon indicating copy to clipboard operation
piranha.core copied to clipboard

Getting blog archive always loads blog post ids from database

Open stefanolsen opened this issue 5 years ago • 1 comments

Every time I get the blog archive, using ArchiveService.GetByIdAsync, the list of blog post IDs is always loaded from the database. The actual post content is loaded from cache (when possible). I suggest the listing could be cached as well, and invalidated when any blog post is changed in the given blog archive. However, for this to work properly, I foresee that we need to implement cache dependencies. I will submit a separate issue for this last part.

stefanolsen avatar Apr 15 '19 09:04 stefanolsen

What kind of traffic are you expecting on your application? The purpose of the cache is not really to hold the entire database in memory, but to reduce repetitive requests and heavy transformations. In my opinion getting 5 (depending on your archive page size) guid values from a SQL Server in order to view an archive is a quite lightweight operation.

tidyui avatar Apr 24 '19 06:04 tidyui