Added support for the `_cache` and` _cache_key` options to the `has_child` and `has_parent` filters.
Closes #2900