Skip to content

store plain value in cache instead of Task, avoid obj and use generic instead if possible #68

Description

@tonyx

For reasons related to the way some Thunks feed the memoize function I moved to storing a Task in the cache. However this choice inhibit full use of L2 cache that now is supported using Sql, Postgres or Redis (because you cannot serialize a Task). Find a way to fix it so let's store the values again, but beware of the the effect of eventual synchronous code awaiting asynchronous code: it may not work causing deadlock! Test with the live example BlazorBookLibrary. Existing automated tests may not be enought at it. Another aspect that I introduced (may be with good intentions) but I regret a little bit is the use of obj type and then box/unbox in the values of the AggregateCache3. box/unbox are costly operations. It was needed as a way to create general multiple command processing functions in CommandHandler. Study a way to get beck to generic instead of obj and box/unbox and still find a way to accommodate the needs for a general different types general processing function (if possible). If it is possible than I'll go for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions