ember-cli-deploy / ember-cli-deploy/ember-cli-deploy-redis
Stash checksum and/or timestamp in Redis
- Lingua principale
- JavaScript
- Stelle
- 17
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia leggendo l’implementazione di ember-deploy-redis e la issue correlata #25 per determinare come vengono archiviati attualmente in Redis la chiave e il contenuto dell’indice. Determina come devono essere rappresentati i metadati del checksum o del timestamp del commit senza compromettere il layout esistente, quindi verifica che i metadati HTTP generati supportino l’uso di ETag e Last-Modified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, redis
- Ambito
- api, database
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100