class Crystalline::ResultCache

Defined in:

crystalline/result_cache.cr

Instance Method Summary

Instance Method Detail

def exists?(entry : String) #

True if the entry (filename) has already been used as a compilation target.


[View source]
def get(entry : String) #

Get a cache value.


[View source]
def invalidate(entry : String) #

Remove the result, store the timestamp.


[View source]
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.


[View source]
def monotonic_now #

Return the current monotonic time.


[View source]
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.


[View source]