Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: more readable Enable/Disable cache for each request #10414

Closed
LeMoussel opened this issue Nov 18, 2021 · 1 comment
Closed

[Feature]: more readable Enable/Disable cache for each request #10414

LeMoussel opened this issue Nov 18, 2021 · 1 comment

Comments

@LeMoussel
Copy link

Feature request

To disable cache, you can use cdp_session.send:

cdp_session = page.context.new_cdp_session(page)
cdp_session.send('Network.setCacheDisabled', {'cacheDisabled': True})

To be more readable, we could have the method: page.set_cache_enabled(enabled)

  • enabled: Boolean value, i.e. one of True or False. Set the enabled state of the cache.
@mxschmitt mxschmitt transferred this issue from microsoft/playwright-python Nov 18, 2021
@mxschmitt
Copy link
Member

This looks like related / a duplicate of #7220. Could you tell us in what kind of limitations you currently run into and why you need it? (feel free to comment directly in #7220 then we can merge these two issues).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants