blob: e533a90f991495805a4d9803fe354784c4bd1c2c [file] [log] [blame]
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class InspectorNetwork(object):
def __init__(self, inspector_backend):
self._inspector_backend = inspector_backend
def ClearCache(self, timeout=60):
"""Clears the browser's disk and memory cache."""
res = self._inspector_backend.SyncRequest({
'method': 'Network.canClearBrowserCache'
}, timeout)
assert res['result'], 'Cache clearing is not supported by this browser'
self._inspector_backend.SyncRequest({
'method': 'Network.clearBrowserCache'
}, timeout)