Distributed coordination of caching and processing by networking devices