Removed the cache option that didnt work anyway
Refactored the `cache` to use cache in nested cases
Added params for media flushing, fixes #23