JsonCacheMem constructor
JsonCacheMem([
- JsonCache? level2
In-memory level 1 cache with an optional level 2 instance.
Note: if you do not pass an object to the parameter level2
, the data
will remain cached in-memory only; that is, no data will be persited to
the local storage of the user's device. Indeed, not persisting data on the
user's device might be the desired behavior if you are at the prototyping
or mocking phase. However, its unlikely to be the right behavior in
production code.
Implementation
JsonCacheMem([JsonCache? level2])
: this.mem(_shrMem, level2: level2, mutex: _shrMutex);