mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Add support for varnish purging based on expressions
Previously we would only purge based on URLs, but some of the upcoming new work requires arbitrary expression purging. NOTE! Require the creation of the new SQL procecure in the database, either from varnish.sql or varnish_local.sql depending on if it's prod or dev.
This commit is contained in:
@ -190,7 +190,7 @@ def admin_purge(request):
|
||||
|
||||
# Fetch list of latest purges
|
||||
curs = connection.cursor()
|
||||
curs.execute("SELECT ev_time, ev_data FROM pgq.event_1 WHERE ev_type='P' ORDER BY ev_time DESC LIMIT 20")
|
||||
curs.execute("SELECT ev_time, ev_data FROM pgq.event_1 WHERE ev_type IN ('P', 'X') ORDER BY ev_time DESC LIMIT 20")
|
||||
latest = [{'t': r[0], 'u': r[1]} for r in curs.fetchall()]
|
||||
|
||||
return render_to_response('core/admin_purge.html', {
|
||||
|
Reference in New Issue
Block a user