Enable caching on assets and avatars (#3376)

* Enable caching on assets and avatars

Fixes #3323

* Only set avatar in user BeforeUpdate when there is no avatar set

* add error checking after stat

* gofmt

* Change cache time for avatars to an hour
This commit is contained in:
Morgan Bazalgette authored and Lauris BH committed 2018-02-04 00:37:05 +02:00
1 parent 77f8bad2fb
commit 17655cdf1b
5 files changed
+155 -34

No files matched your search

+1 -6
View File
@@ -12,10 +12,5 @@ import (
// Static implements the macaron static handler for serving assets.
func Static(opts *Options) macaron.Handler {
return macaron.Static(
opts.Directory,
macaron.StaticOptions{
SkipLogging: opts.SkipLogging,
},
)
return opts.staticHandler(opts.Directory)
}