fix(backend/assets): return back cache checks in s3
This commit is contained in:
parent
404f6204e1
commit
2dccb2142b
2 changed files with 4 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ func main() {
|
|||
func(sessionID uint64, message messages.Message, e *types.Meta) {
|
||||
switch msg := message.(type) {
|
||||
case *messages.AssetCache:
|
||||
cacher.CacheURL(sessionID, msg.URL) // save assets every time
|
||||
cacher.CacheURL(sessionID, msg.URL)
|
||||
totalAssets.Add(context.Background(), 1)
|
||||
case *messages.ErrorEvent:
|
||||
if msg.Source != "js_exception" {
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ func (c *cacher) cacheURL(requestURL string, sessionID uint64, depth byte, conte
|
|||
return
|
||||
}
|
||||
c.timeoutMap.add(cachePath)
|
||||
//if c.s3.Exists(cachePath) {
|
||||
// return
|
||||
//}
|
||||
if c.s3.Exists(cachePath) {
|
||||
return
|
||||
}
|
||||
|
||||
req, _ := http.NewRequest("GET", requestURL, nil)
|
||||
req.Header.Set("Cookie", "ABv=3;") // Hack for rueducommerce
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue