| |
- __builtin__.object
-
- XPathExpressionCacheType
class XPathExpressionCacheType(__builtin__.object) |
|
XPathExpressionCacheType - The type of the XPath Expression Cache.
This is meant to be used as a singleton, the instance being "XPathExpressionCache" |
|
Methods defined here:
- __init__(self)
- __init__ - Create this object
- applyCachedExpressionIfAvailable(self, expressionStr, xpathExpressionObj)
- applyCachedExpressionIfAvailable - Check if a cached compiled expression object is available, based on the xpath expression string,
and if it is, update the expression object's members with the cached version.
@param expressionStr <str> - The XPath expression str
@param xpathExpressionObj <xpath.expression.XPathExpression> - The expression object
@return <bool> - True if did apply from cache, False if no match (expression needs to be compiled)
- getCachedExpression(self, expressionStr)
- getCachedExpression - Try to get a cached XPathExpression object for a given key
@param expressionStr <str> - The XPath expression str
@return <XPathExpression/None> - The XPathExpression object, if one was cached, otherwise None
- setCachedExpression(self, expressionStr, xpathExpressionObj)
- setCachedExpression - Sets the expression object to be cached under a given string
@param expressionStr <str> - The XPath expression str
@param xpathExpressionObj <XPathExpression> - The XPathExpression object
Static methods defined here:
- getKeyForExpressionStr(expressionStr)
- getKeyForExpressionStr - Get a unique hash "key" for a given expression str,
as will be used to cache the compiled expression.
@param expressionStr <str/unicode/bytes> - The XPath expression str
@return <str> - The key
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |