class Nokogiri::CSS::Parser

def cache_on?

Return a thread-local boolean indicating whether the CSS-to-XPath cache is active. (Default is `true`.)
def cache_on?
  !Thread.current[CACHE_SWITCH_NAME]
end