A cache replacement system and method for changing the number of cached copies
of segments of a media clip in response to rank change for the media clip is disclosed.
Whenever rank change for a media clip is detected at an origin server, rank change
information is distributed to proxy servers organized in a loosely coupled distributed
cache. Each proxy server uses this information to recompute caching probabilities
for segments of the media clip in order to determine which segments of the clip
to store or discard, thereby forming a new cache layout for the clip at each proxy
server. Segments are neither added nor deleted to build the new cache layout until
client requests for segments of the clip are received at proxy servers. Upon receiving
client requests, construction of the new cache layout occurs on a segment-by-segment
basis by employing techniques of lazy caching and token exchange.