Class: Factorix::Cache::Entry
- Inherits:
-
Data
- Object
- Data
- Factorix::Cache::Entry
- Defined in:
- lib/factorix/cache/entry.rb,
lib/factorix/cache/entry.rb
Overview
Represents a cache entry for enumeration operations.
Used by Base#each to yield entry metadata alongside keys. Note: The key is NOT included in Entry; it is yielded separately.
Instance Attribute Summary collapse
-
#age ⇒ Float
readonly
Age in seconds since creation/modification.
-
#size ⇒ Integer
readonly
Entry size in bytes.
Instance Method Summary collapse
-
#expired? ⇒ Boolean
Check if the cache entry has expired.
Instance Attribute Details
#age ⇒ Float (readonly)
Returns age in seconds since creation/modification.
16 17 18 |
# File 'lib/factorix/cache/entry.rb', line 16 def age @age end |
#size ⇒ Integer (readonly)
Returns entry size in bytes.
16 17 18 |
# File 'lib/factorix/cache/entry.rb', line 16 def size @size end |
Instance Method Details
#expired? ⇒ Boolean
Check if the cache entry has expired.
22 |
# File 'lib/factorix/cache/entry.rb', line 22 def expired? = expired |