Handle SQL API errors by logging them and requesting NO cache

SQL api is used to determine the list of source tables affected
by a query. Before this commit, the X-Cache-Channel header set
on sql api error was an arbitrary 'table' string, now the header
is omitted, the error logged and Cache-Control and Pragma headers
are sent as an attempt to request no caching.

The code includes test for this mechanism.
This commit is contained in:
Sandro Santilli
2013-03-13 10:39:00 +01:00
parent 49aad435b9
commit e8cbc666e2
5 changed files with 121 additions and 26 deletions
+4 -2
View File
@@ -48,8 +48,10 @@ var config = {
}
,sqlapi: {
protocol: 'http',
host: 'localhost.lan',
port: 8080,
host: '',
// This port will be used by "make check" for testing purposes
// It must be available
port: 1080,
version: 'v1'
}
,varnish: {