Module: Appom::ElementCache
- Defined in:
- lib/appom/element_cache.rb
Overview
Element caching system for Appom automation framework Provides intelligent element caching with TTL and LRU eviction policies
Defined Under Namespace
Modules: CacheAwareFinder
Classes: Cache
Class Method Summary
collapse
Class Method Details
.cache ⇒ Object
319
320
321
|
# File 'lib/appom/element_cache.rb', line 319
def cache
@global_cache || (@cache ||= Cache.new)
end
|
.cache_element(strategy, value, element) ⇒ Object
331
332
333
|
# File 'lib/appom/element_cache.rb', line 331
def cache_element(strategy, value, element)
cache.store(strategy, value, element)
end
|
.cache_hit?(key) ⇒ Boolean
339
340
341
|
# File 'lib/appom/element_cache.rb', line 339
def cache_hit?(key)
cache.hit?(key)
end
|
.cache_statistics ⇒ Object
343
344
345
|
# File 'lib/appom/element_cache.rb', line 343
def cache_statistics
cache.statistics
end
|
.clear_cache ⇒ Object
323
324
325
|
# File 'lib/appom/element_cache.rb', line 323
def clear_cache
cache.clear
end
|
347
348
349
|
# File 'lib/appom/element_cache.rb', line 347
def configure_cache(**)
@global_cache = Cache.new(**)
end
|
.get_cached_element(key) ⇒ Object
335
336
337
|
# File 'lib/appom/element_cache.rb', line 335
def get_cached_element(key)
cache.get(key)
end
|
.reset_cache ⇒ Object
327
328
329
|
# File 'lib/appom/element_cache.rb', line 327
def reset_cache
cache.reset
end
|