CacheManager class

Cache manager is responsible for reading and writing data into cache

Constructors

CacheManager()

Properties

cache Map<String, dynamic>
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
delete(String type, String name) → void
Delete a specific key-value from cache map
deleteTopic(String topicName) → void
This is a wrapper for delete function which deletes a topic from cache by topic name
deleteUser(String userId) → void
This is a wrapper for delete function which deletes a user from cache by userId
get(String type, String name) → dynamic
Get a specific data from cache using type and name
getUser(String userId) TopicSubscription?
This is a wrapper for get function which gets a user from cache by userId
map(MapEntry function(String, dynamic)) → void
Executes a function for each element in cache, just like map method on Map
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String type, String name, dynamic obj) → void
Put a new data into cache, if the data already exists, replace it
putTopic(Topic topic) → void
This is a wrapper for put function which puts a topic into cache
putUser(String userId, TopicSubscription user) → void
This is a wrapper for put function which puts a user into cache by userId
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited