# Method Protocols.LDAP.get_cached_filter()

Method get_cached_filter

  `object get_cached_filter(string filter, void|int ldap_version)`

Description

  Like make_filter but saves the generated objects for reuse. Useful for filters that reasonably will occur often. The cache is never garbage collected, however.

Throws

  If there's a parse error in the filter then a FilterError is thrown as from make_filter.