Store the current regex syntax along with the regular expression string as the key to the cache.  This means that changing the syntax will return the correct compiled pattern.
Store the current regex syntax along with the regular expression
string as the key to the cache.  This means that changing the syntax
will return the correct compiled pattern.

clear_cache(): New function.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator