Optimization of content-centric networks