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

fix: Cache invalidation api #26975

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion posthog/models/remote_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def _purge_cdn(self):
res = requests.post(
settings.REMOTE_CONFIG_CDN_PURGE_ENDPOINT,
headers={"Authorization": f"Bearer {settings.REMOTE_CONFIG_CDN_PURGE_TOKEN}"},
data=data,
json=data,
)

if res.status_code != 200:
Expand Down
2 changes: 1 addition & 1 deletion posthog/models/test/test_remote_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def test_purges_cdn_cache_on_sync(self, mock_post):
mock_post.assert_called_once_with(
"https://api.cloudflare.com/client/v4/zones/MY_ZONE_ID/purge_cache",
headers={"Authorization": "Bearer MY_TOKEN"},
data={
json={
"files": [
{"url": "https://cdn.posthog.com/array/phc_12345/config"},
{"url": "https://cdn.posthog.com/array/phc_12345/config.js"},
Expand Down
Loading