Cache class
Represents a cached response.
Stores the rendered content, content type, and creation time to manage cache validity and response headers.
Constructors
- Cache({required String render, required ContentType? contentType, DateTime? createdAt})
- Creates a Cache instance.
-
Cache.fromJson(Map<
String, dynamic> json) -
Creates a Cache instance from a JSON map.
factory
Properties
- contentType ↔ ContentType?
-
The ContentType of the cached response.
getter/setter pair
- createdAt ↔ DateTime
-
The time when this cache entry was created.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- render ↔ String
-
The rendered string content of the response.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJsonString(
) → String - Converts the Cache instance into a JSON string.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited