Universal cache handler