Redis is too much of a problem. If we can get onto GAE Flex via #100, then we can just use managed Memcache instead. But for now, we don't actually need this level of caching and should just use Google's Edge caching via headers.
Here's an example of how to setup Edge caching in Express with TypeScript
routes/index.ts:
import * as express from 'express';
const MAX_AGE = 3600; // 1 hr
function addCache(request: express.Request, response: express.Response, next: express.NextFunction) {
response.header('Cache-Control', `public, max-age=${MAX_AGE}`);
response.header('Pragma', 'Public');
next();
}
Redis is too much of a problem. If we can get onto GAE Flex via #100, then we can just use managed Memcache instead. But for now, we don't actually need this level of caching and should just use Google's Edge caching via headers.
Here's an example of how to setup Edge caching in Express with TypeScript
routes/index.ts: