class Crystalline::ResultCache
- Crystalline::ResultCache
- Reference
- Object
Defined in:
crystalline/result_cache.crInstance Method Summary
-
#exists?(entry : String)
True if the entry (filename) has already been used as a compilation target.
-
#get(entry : String)
Get a cache value.
-
#invalidate(entry : String)
Remove the result, store the timestamp.
-
#invalidated?(entry : String, *, since : Time::Span | Nil = nil) : Bool
True if the cache has been invalidated since the since time argument, or if the entry is invalided if since is not provided.
-
#monotonic_now
Return the current monotonic time.
-
#set(entry : String, result : Crystal::Compiler::Result | Nil, *, unless_invalidated_since : Time::Span | Nil = nil)
Store a compiler result by target name.
Instance Method Detail
def exists?(entry : String)
#
True if the entry (filename) has already been used as a compilation target.
def invalidated?(entry : String, *, since : Time::Span | Nil = nil) : Bool
#
True if the cache has been invalidated since the since time argument, or if the entry is invalided if since is not provided.
def set(entry : String, result : Crystal::Compiler::Result | Nil, *, unless_invalidated_since : Time::Span | Nil = nil)
#
Store a compiler result by target name.
If unless_invalidated_since is provided, is will not store the result if the previous result has been invalidated since the privided timestamp.