EventCacheStateRecord class

Lean derived cache metadata for one event.

This intentionally does not embed the full Nip01Event. It persists only the extra state useful for cache maintenance tasks such as eviction planning.

Constructors

EventCacheStateRecord({required String eventId, required String pubKey, required int kind, required int createdAt, String? coordinateKey, required bool isCurrent, int? expirationAt, String? deletedByEventId})
const
EventCacheStateRecord.fromJson(Map<String, dynamic> json)
factory

Properties

coordinateKey String?
final
createdAt int
final
deletedByEventId String?
final
eventId String
final
expirationAt int?
final
hashCode int
The hash code for this object.
no setterinherited
isCurrent bool
final
isDeleted bool
no setter
kind int
final
pubKey String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isExpiredAt(int timestamp) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

buildForEvents(List<Nip01Event> rawEvents, {int? now}) List<EventCacheStateRecord>
Builds derived state records from raw events using the same visibility semantics as cache reads and eviction planning.