|cachePredicate|function(){returntrue};|Afunctionwhichdecideswhetherarequestshouldbecachedornot.Anobjectispassedtothefunctionwith`path` and `request`properties.|
Similarto`webpack`, the core of `enhanced-resolve` functionality is implemented as individual plugins that are executed using [`tapable`](https://github.com/webpack/tapable).
Apluginshouldbea`class` (or its ES5 equivalent) with an `apply` method. The `apply` method will receive a `resolver`instance,thatcanbeusedtohookintotheeventsystem.
Pluginsareexecutedinapipeline,andregisterwhicheventtheyshouldbeexecutedbefore/after.Intheexampleabove,`source` is the name of the event that starts the pipeline, and `target` is what event this plugin should fire, which is what continues the execution of the pipeline. For an example of how these different plugin events create a chain, see `lib/ResolverFactory.js`, in the `//// pipeline ////`section.
##Escaping
It'sallowedtoescape`#` as `\0#`toavoidparsingitasfragment.
enhanced-resolvewilltrytoresolverequestscontaining`#` as path and as fragment, so it will automatically figure out if `./some#thing` means `.../some.js#thing` or `.../some#thing.js`. When a `#` is resolved as path it will be escaped in the result. Here: `.../some\0#thing.js`.
Ifyouareusing`webpack`, and you want to pass custom options to `enhanced-resolve`, the options are passed from the `resolve`keyofyourwebpackconfiguratione.g.: