Sandro Santilli
a60a3adc12
CartoDB redis interaction delegated to "cartodb-redis" module
2013-12-17 17:17:14 +01:00
Sandro Santilli
baa95a62d1
Add support for reading user-specific database_password from redis
...
This commits adds support for CartoDB-2.5.0 model.
Closes #89 .
Change is backward compatible.
2013-12-17 17:17:14 +01:00
Sandro Santilli
12f0826d32
Do not force ending dot in SQL-API hostname, for easier testing
2013-12-17 17:17:14 +01:00
Sandro Santilli
07cb36ebc7
Read user's database_host from redis, when available ( #88 )
...
Still lacks a testcase
2013-12-17 17:17:14 +01:00
Sandro Santilli
d7c82e7a51
Indent fixes
2013-12-17 17:17:14 +01:00
Sandro Santilli
bf340e684a
Tweak error messages on missing redis variables, update tests
2013-12-17 17:17:14 +01:00
Luis Bosque
8d1b394df1
Add function to read database host from redis
2013-12-17 17:17:14 +01:00
Sandro Santilli
eb51d18012
Add support for specifying database connection passwords
2013-12-17 17:17:13 +01:00
Sandro Santilli
a27cf1b41c
Do not let anonymous requests use authorized renderer caches
...
Puts dbuser in params, for correct use by Windshaft renderer cache.
Before this fix, and after commit 1c9f63c9
, the renderer cache key
did not contain the db user.
2013-12-17 17:17:12 +01:00
Sandro Santilli
f5c24cf252
Add more profile slots
2013-12-17 17:17:11 +01:00
Sandro Santilli
dbf6bb5fca
Only use sqlapi configuration "host" if "domain" is undefined
...
We'll consider an empty string domain as valid (it's actually used
for testsuite).
2013-12-17 17:17:11 +01:00
Javier Arce
d4d5272bf2
Sets the sqlapi domain. Fixes #82
2013-12-17 17:17:11 +01:00
Sandro Santilli
633e8d164b
Rename sqlapi.host configuration to sqlapi.domain. Closes #79 .
...
Support for "host" is retained for backward compatibility.
2013-08-21 10:11:30 +02:00
Sandro Santilli
ec97381820
Add more timing in the profile, add useProfiler config variable
...
Default to useProfiler:true in staging and development
2013-07-16 16:33:03 +02:00
Sandro Santilli
381b9a9edf
Take cache_buster value, if present, as a Last-Modified timestamp
...
This makes the Last-Modified header consistent across requests
using the same cache_buster (embedded in the token for multilayer
API).
2013-07-15 13:48:06 +02:00
Sandro Santilli
76c056c7a1
Revert "Use a constant Last-Modified time with cache_policy=persist"
...
This reverts commit 4b5899ff1a
.
The reason is that setting Last-Modified to a remote date in the past
triggers early expiration of cache (as max-age will be reached sooner)
2013-07-15 13:14:06 +02:00
Sandro Santilli
4b5899ff1a
Use a constant Last-Modified time with cache_policy=persist
...
After all if the client is asking for persistance it doesn't make
sense to set a different Last-Modified for different incoming
requests (even if we don't expect any) ....
2013-07-15 12:09:13 +02:00
Sandro Santilli
afd4c3b460
Set Last-Modified header to allow for 304 responses
2013-07-15 12:02:54 +02:00
Sandro Santilli
65c7c5fc9c
Always serve multilayer tiles and grids with persisting cache request
2013-07-08 12:13:45 +02:00
Sandro Santilli
60242c80f4
Set default layergroup time to live in redis to 2 hours
2013-07-08 11:50:19 +02:00
Sandro Santilli
632d75a7c8
specify units for rendererConfig.cache_ttl
2013-06-28 17:58:11 +02:00
Sandro Santilli
d7b1ff9a80
Set default layergroup ttl locally
2013-06-26 16:26:02 +02:00
Sandro Santilli
eb83851bb7
Fix database authentication with multi-table layergroups
2013-06-17 17:24:09 +02:00
Sandro Santilli
70f535d13a
Properly report error from unsuccessful source table fetching
...
Report terse error to user, verbose to log
2013-06-11 10:28:05 +02:00
Sandro Santilli
63296a87cb
Do not increment undefined mapview stat tags
2013-06-06 13:26:59 +02:00
Sandro Santilli
d977f83bd1
Change stats format for multilayer map token request
...
See https://github.com/Vizzuality/Windshaft-cartodb/wiki/Redis-stats-format
Target 1.3.0
2013-06-04 13:30:28 +02:00
Sandro Santilli
5b6919e0c6
Fix unit of measure for lastUpdated info extraction
2013-05-30 16:48:40 +02:00
javi
efa79b243c
fixed lzma decoding to fix browser requirements
2013-04-24 15:10:58 +02:00
Sandro Santilli
f0fc44aac9
Fix fetching of affected tables when mapnik tokens are used
...
We'll replace !bbox! with an empty box and !pixel_width! and
!pixel_height! with 1 before passing the query to CDB_QueryTable
2013-04-23 17:29:49 +02:00
Sandro Santilli
f85ca16c62
Change LZMA expected encoding from HEX to base64, reducing its size
2013-04-19 16:16:20 +02:00
Sandro Santilli
14953e992f
Multilayer API changes, target 1.2.0
...
- Layers passed by index in grid fetching url
- Interactivity only specified in layergroup config
- Encode cache_buster as part of the token
2013-04-15 18:51:28 +02:00
Sandro Santilli
78a6f4de1b
Keep a counter of layergroup created per user.
...
The counter is in redis db 5, in a field "mapviews" of an hash
"tiler:users:USERNAME". It's incremented whenever the layergroup
token for a configuration is requested.
2013-04-12 17:28:34 +02:00
Sandro Santilli
83e6e0d457
More verbose logging for SQL api connection errors
2013-04-09 18:07:53 +02:00
Sandro Santilli
e5af3b90f4
Revert "Require interactivity param in single-layer grid fetching request"
...
This reverts commit 3383c44eb7
.
Fixes regression with default interactivity parameter.
Closes #74 . See #69 .
2013-04-05 18:11:36 +02:00
Sandro Santilli
113b70cf98
Add support for creating layergroups via GET
2013-04-02 13:30:49 +02:00
Sandro Santilli
3383c44eb7
Require interactivity param in single-layer grid fetching request
...
Closes #69
2013-03-29 18:25:28 +01:00
Sandro Santilli
001bf97d69
Add support for LZMA compressed GET parameters
...
You can now replace the whole query string with a single `lzma`
parameter having as value an hex encoded LZMA compressed version
of the whole query string as a JSON object.
2013-03-22 18:55:59 +01:00
javi
e53122de7e
fixed last_update in laytergroup response
2013-03-21 11:39:55 +01:00
Sandro Santilli
3ff3dc2c97
Cleanup, handle error in req2param on flushCache
2013-03-15 19:25:13 +01:00
Sandro Santilli
4605bd1e1d
Add last_modified field to POST layergroup response ( #72 )
...
Includes testcases
2013-03-13 18:41:37 +01:00
Sandro Santilli
dfc4a02398
Fix X-Cache-Channel for multilayer (by token) responses
...
Required upgrading Windshaft to 0.9.2
Includes testcases
2013-03-13 16:45:15 +01:00
Sandro Santilli
402fc90e63
Absence of X-Cache-Channel will be enough for Varnish to skip caching
...
Do not override Cache-Control in this case, which means let the
clients or geographical proxies cache the response with usual TTL.
2013-03-13 12:01:35 +01:00
Sandro Santilli
e8cbc666e2
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.
2013-03-13 10:39:00 +01:00
Sandro Santilli
f6d50fafb1
Expose renderer settings in the environment config files
...
These are: metatile, bufferSize and cache_ttl
2013-02-25 17:05:59 +01:00
Sandro Santilli
9dcf6a1acf
Set 'base_url_notable' config for Windshaft-0.9 (multilayer)
2013-02-12 18:53:41 +01:00
Sandro Santilli
a79b999e7a
Do not try to send commands to an unoconnected redis client
...
This changes "Cannot read property 'HGET' of null" messages into
"Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED".
2013-02-11 15:05:23 +01:00
Sandro Santilli
6b71cde56e
Do not throw an Error embedding another Error
...
Should fix #68 , but doesn't come with an automated test
2013-02-08 12:27:49 +01:00
Sandro Santilli
cb57dfb27d
Fix async throws in getGeometryType, getInfoWindow and getMapMetadata
2013-02-08 12:14:53 +01:00
Sandro Santilli
8d4f033a56
Revert "getDatabase: properly handle redis connection failures"
...
This reverts commit dd19d74149
.
The code was already correct
2013-01-28 17:39:50 +01:00
Sandro Santilli
dd19d74149
getDatabase: properly handle redis connection failures
2013-01-28 17:30:58 +01:00