ember-cli-deploy / ember-cli-deploy/ember-cli-deploy-redis
Stash checksum and/or timestamp in Redis
- Lenguaje dominante
- JavaScript
- Estrellas
- 17
- Forks
- 40
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Similar to #25, it would be fantastic if ember-deploy-redis would also stash a checksum (or the commit SHA) and/or a build date/time (or the commit timestamp) of the index to use in the the `ETag` and `Last-Modified` HTTP headers. Something like:
```
foo:index:current => '...'
foo:index:current:meta => checksum '787b3dd284fd99202adfa4e18a28126d159552c5'
timestamp 'Wed Sep 16 19:28:37 2015 +0200'
```
And then...
``` ruby
require 'sinatra'
require 'redis'
get '/' do
content_type 'text/html'
expires 3_600, :public
redis = Redis.new
index_key = redis.get("foo:current")
index_key = "foo:#{params[:index_key]}" if params[:index_key]
meta = redis.hgetall("#{index_key}:meta")
etag meta[:checksum]
last_modified meta[:timestamp]
redis.get(index_key)
end
```
Stashing the content in the same hash as the metadata would be ideal (to limit the Redis hits) but would break backwards compatibility.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Empieza leyendo la implementación de ember-deploy-redis y el issue relacionado #25 para averiguar cómo se almacenan actualmente la clave y el contenido del índice en Redis. Determina cómo deben representarse los metadatos de la suma de comprobación o de la marca de tiempo del commit sin romper el diseño existente y, después, verifica que los metadatos HTTP generados admitan el uso de ETag y Last-Modified.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, redis
- Área
- api, database
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100