statCachedMeta returns metadata from cache - including ranges cached, partial to indicate if partial object is cached.
(ctx context.Context, cacheObjPath string)
| 506 | // statCachedMeta returns metadata from cache - including ranges cached, partial to indicate |
| 507 | // if partial object is cached. |
| 508 | func (c *diskCache) statCachedMeta(ctx context.Context, cacheObjPath string) (meta *cacheMeta, partial bool, numHits int, err error) { |
| 509 | cLock := c.NewNSLockFn(cacheObjPath) |
| 510 | lkctx, err := cLock.GetRLock(ctx, globalOperationTimeout) |
| 511 | if err != nil { |
| 512 | return |
| 513 | } |
| 514 | ctx = lkctx.Context() |
| 515 | defer cLock.RUnlock(lkctx) |
| 516 | return c.statCache(ctx, cacheObjPath) |
| 517 | } |
| 518 | |
| 519 | // statRange returns ObjectInfo and RangeInfo from disk cache |
| 520 | func (c *diskCache) statRange(ctx context.Context, bucket, object string, rs *HTTPRangeSpec) (oi ObjectInfo, rngInfo RangeInfo, numHits int, err error) { |