~blu/artemis

7d3e5a0bcf3181bcac90c1fff5f28abcf2b808b2 — Bryant Conquest 1 year, 4 months ago d61c096
oops
2 files changed, 2 insertions(+), 2 deletions(-)

M cache/cache.go
M main.go
M cache/cache.go => cache/cache.go +1 -1
@@ 99,7 99,7 @@ func (c *Cache) freeCache(toFreeSpace uint64) error {
	for _, value := range c.Files {
		assets = append(assets, value)
	}
	c.FileLock.Unlock()
	c.FileLock.RUnlock()

	sort.Slice(assets, func(i, j int) bool { return assets[i].Hits < assets[j].Hits })


M main.go => main.go +1 -1
@@ 50,7 50,7 @@ func (h *Handler) AssetHandler(w http.ResponseWriter, r *http.Request) {
	etag := r.Header.Get("If-None-Match")
	h.etagLock.RLock()
	ok := h.etags[etag]
	h.etagLock.Unlock()
	h.etagLock.RUnlock()
	if ok {
		w.WriteHeader(http.StatusNotModified)
		return