Giter Site home page Giter Site logo

Comments (11)

tomasfil avatar tomasfil commented on May 18, 2024

After some testing the issue is ReactiveObject, upon removing inheritation from ReactiveObject, then the cache is running just fine.

from akavache.

glennawatson avatar glennawatson commented on May 18, 2024

ReactiveObject has some quirks in regards to serialisation.

from akavache.

tomasfil avatar tomasfil commented on May 18, 2024

Almost all my domain object are inheriting ReactiveObject, so forth making it every single one not usable with the Akavache cache...

from akavache.

tomasfil avatar tomasfil commented on May 18, 2024

@glennawatson Any tip how to make this work? It seems like I would need to implement whole new layer for DTOs, that would get cached.
That would be Entity -> DTO -> Domain object

Which doesnt really makes sense, because all of the apps are WPF, accessing database directly via repository pattern on top of Entity framework, so the Entities are our DTOs.

Implementing DTOs would require to make huge infrastructure changes, since some entities are desired and some not to be cached.

The most reasonable thing is to cache normally ReactiveObject, but I am not sure where the issue lies in the first place.

from akavache.

glennawatson avatar glennawatson commented on May 18, 2024

If it was me I would use source generators to generate the dto at compile time so I'm not having to manually generate them all.

There are some serialisation hints in the docs that may help

One thing I can think of causing issues is Akavache uses the binary compiler by default.

from akavache.

glennawatson avatar glennawatson commented on May 18, 2024

https://www.reactiveui.net/docs/handbook/data-persistence/

from akavache.

tomasfil avatar tomasfil commented on May 18, 2024

I am aware of DTO generators, but for this project it doesnt make sense to map the entity 2 times, it is just excesive.

Binary compiler? Is there way for me to test out this theory? I went through source code briefly, but didnt find out what you mean

from akavache.

tomasfil avatar tomasfil commented on May 18, 2024

I am aware of this, i use it for the user preferences and settings, but I wanted to use Akavache for the temporary cache of some objects, that get loaded from db from time to time, but need to be refreshed 30-60 minutes.

I thought that it would be good idea to use Akavache, since it is from ReactiveUI, but it makes little to no sense, that it has problems with the main MVVM framework object of RxUI.

from akavache.

tomasfil avatar tomasfil commented on May 18, 2024

To complement, the issue is there not only on NET 5, but on NET 6 and all latest versions:
image

from akavache.

tomasfil avatar tomasfil commented on May 18, 2024

Oof, so, it seems like restarting the computer fixed the issue 😄 I will test out tomorrow and close the issue if that is the case

from akavache.

github-actions avatar github-actions commented on May 18, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from akavache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.