Commit 6e523e0a authored by Dustin L. Howett's avatar Dustin L. Howett

Add Expirator.Len().

parent 08ddb196
......@@ -210,3 +210,12 @@ func (e *Expirator) ObjectHasExpiration(ex Expirable) bool {
_, ok := e.expirationMap[id]
return ok
}
// Len returns the number of objects registered for expiration.
func (e *Expirator) Len() (l int) {
l = 0
if e.expirationMap != nil {
l = len(e.expirationMap)
}
return
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment