isolating unproxy code
using headers for cache
refactoring to consider headers option