Refactor invalidations handling logic
- Extract invalidate handling logic to avoid duplication
- Standardize processing pipeline (pre, main, post) for values and URLs
- Add more detailed logging at each pipeline stage
- Minor code cleanup and refactoring
Refactor invalidations handling logic