A content delivery network, comprising: nodes communicatively coupled to neighboring nodes via respective links, each node configured to cache a unit of content and send a content request to an upstream neighboring node to request the unit of content if not cached, a given node among the nodes configured to calculate network costs, the network costs including (i) marginal cost of caching the unit of content, and (ii) marginal cost of forwarding the content request to at least one neighboring node, the marginal cost of the forwarding of the content request and the marginal cost of the caching of the unit of content both being dependent on both link congestion between the given node and the at least one neighboring node and link congestion on links of an upstream path of nodes toward and including a source node, the source node guaranteed to have the unit of content available, each node along the upstream path being configured to perform a respective calculation of the costs and to report same to its downstream neighboring node making the content request, the given node further configured to: calculate cache scores from a product of a total arrival rate of requests at the given node for the unit of content and corresponding marginal costs of forwarding the requests; determine whether to cache the unit of content at the given node based on its corresponding cache score; and direct data units of the unit of content, or chunks thereof, for delivery to a destination node. nodes communicatively coupled to neighboring nodes via respective links, each node configured to cache a unit of content and send a content request to an upstream neighboring node to request the unit of content if not cached, a given node among the nodes configured to calculate network costs, the network costs including (i) marginal cost of caching the unit of content, and (ii) marginal cost of forwarding the content request to at least one neighboring node, the marginal cost of the forwarding of the content request and the marginal cost of the caching of the unit of content both being dependent on both link congestion between the given node and the at least one neighboring node and link congestion on links of an upstream path of nodes toward and including a source node, the source node guaranteed to have the unit of content available, each node along the upstream path being configured to perform a respective calculation of the costs and to report same to its downstream neighboring node making the content request, the given node further configured to: calculate cache scores from a product of a total arrival rate of requests at the given node for the unit of content and corresponding marginal costs of forwarding the requests; determine whether to cache the unit of content at the given node based on its corresponding cache score; and direct data units of the unit of content, or chunks thereof, for delivery to a destination node. calculate cache scores from a product of a total arrival rate of requests at the given node for the unit of content and corresponding marginal costs of forwarding the requests; determine whether to cache the unit of content at the given node based on its corresponding cache score; and direct data units of the unit of content, or chunks thereof, for delivery to a destination node.