Class: Selenium::DevTools::V85::CacheStorage
- Inherits:
-
Object
- Object
- Selenium::DevTools::V85::CacheStorage
- Defined in:
- lib/selenium/devtools/v85/cache_storage.rb
Instance Method Summary collapse
- #delete_cache(cache_id:) ⇒ Object
- #delete_entry(cache_id:, request:) ⇒ Object
-
#initialize(devtools) ⇒ CacheStorage
constructor
A new instance of CacheStorage.
- #on(event, &block) ⇒ Object
- #request_cache_names(security_origin:) ⇒ Object
- #request_cached_response(cache_id:, request_url:, request_headers:) ⇒ Object
- #request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ CacheStorage
Returns a new instance of CacheStorage.
26 27 28 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 26 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#delete_cache(cache_id:) ⇒ Object
35 36 37 38 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 35 def delete_cache(cache_id:) @devtools.send_cmd('CacheStorage.deleteCache', cacheId: cache_id) end |
#delete_entry(cache_id:, request:) ⇒ Object
40 41 42 43 44 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 40 def delete_entry(cache_id:, request:) @devtools.send_cmd('CacheStorage.deleteEntry', cacheId: cache_id, request: request) end |
#on(event, &block) ⇒ Object
30 31 32 33 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 30 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["CacheStorage.#{event}"] << block end |
#request_cache_names(security_origin:) ⇒ Object
46 47 48 49 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 46 def request_cache_names(security_origin:) @devtools.send_cmd('CacheStorage.requestCacheNames', securityOrigin: security_origin) end |
#request_cached_response(cache_id:, request_url:, request_headers:) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 51 def request_cached_response(cache_id:, request_url:, request_headers:) @devtools.send_cmd('CacheStorage.requestCachedResponse', cacheId: cache_id, requestURL: request_url, requestHeaders: request_headers) end |
#request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/selenium/devtools/v85/cache_storage.rb', line 58 def request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil) @devtools.send_cmd('CacheStorage.requestEntries', cacheId: cache_id, skipCount: skip_count, pageSize: page_size, pathFilter: path_filter) end |