1+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2+ < html > < head > < title > Python: module AdvancedHTMLParser.xpath._cache</ title >
3+ < meta charset ="utf-8 " />
4+ </ head > < body bgcolor ="#f0f0f8 " >
5+
6+ < table cellpadding ="2 " width ="100% " border ="0 " cellspacing ="0 " summary ="heading " >
7+ < tr bgcolor ="#7799ee " >
8+ < td valign ="bottom " > < br />
9+ < font color ="#ffffff " face ="helvetica, arial " > < br /> < big > < big > < strong > < a href ="AdvancedHTMLParser.html " > < font color ="#ffffff " > AdvancedHTMLParser</ font > </ a > .< a href ="AdvancedHTMLParser.xpath.html " > < font color ="#ffffff " > xpath</ font > </ a > ._cache</ strong > </ big > </ big > </ font > </ td > < td align ="right " valign ="bottom " > < font color ="#ffffff " face ="helvetica, arial " > < a href ="AdvancedHTMLParser.html " > index</ a > </ font > </ td > </ tr > </ table >
10+ < p > < tt > Copyright (c) 2019 Timothy Savannah under terms of LGPLv3. All Rights Reserved.< br />
11+ < br />
12+ See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information.< br />
13+ < br />
14+ See: https://github.com/kata198/AdvancedHTMLParser for full information< br />
15+ < br />
16+ < br />
17+ ==INTERNAL==< br />
18+ < br />
19+ xpath._cache.py - Internal module for caching recent XPath expression parsings</ tt > </ p >
20+ < p >
21+ < table cellpadding ="2 " width ="100% " border ="0 " cellspacing ="0 " summary ="section " >
22+ < tr bgcolor ="#aa55cc " >
23+ < td colspan ="3 " valign ="bottom " > < br />
24+ < font color ="#ffffff " face ="helvetica, arial " > < big > < strong > Modules</ strong > </ big > </ font > </ td > </ tr >
25+
26+ < tr > < td bgcolor ="#aa55cc " > < tt > </ tt > </ td > < td > </ td >
27+ < td width ="100% " > < table width ="100% " summary ="list " > < tr > < td width ="25% " valign ="top " > < a href ="threading.html " > threading</ a > < br />
28+ </ td > < td width ="25% " valign ="top " > </ td > < td width ="25% " valign ="top " > </ td > < td width ="25% " valign ="top " > </ td > </ tr > </ table > </ td > </ tr > </ table > < p >
29+ < table cellpadding ="2 " width ="100% " border ="0 " cellspacing ="0 " summary ="section " >
30+ < tr bgcolor ="#ee77aa " >
31+ < td colspan ="3 " valign ="bottom " > < br />
32+ < font color ="#ffffff " face ="helvetica, arial " > < big > < strong > Classes</ strong > </ big > </ font > </ td > </ tr >
33+
34+ < tr > < td bgcolor ="#ee77aa " > < tt > </ tt > </ td > < td > </ td >
35+ < td width ="100% " > < dl >
36+ < dt > < font face ="helvetica, arial " > < a href ="__builtin__.html#object " > __builtin__.object</ a >
37+ </ font > </ dt > < dd >
38+ < dl >
39+ < dt > < font face ="helvetica, arial " > < a href ="AdvancedHTMLParser.xpath._cache.html#XPathExpressionCacheType " > XPathExpressionCacheType</ a >
40+ </ font > </ dt > </ dl >
41+ </ dd >
42+ </ dl >
43+ < p >
44+ < table cellpadding ="2 " width ="100% " border ="0 " cellspacing ="0 " summary ="section " >
45+ < tr bgcolor ="#ffc8d8 " >
46+ < td colspan ="3 " valign ="bottom " > < br />
47+ < font color ="#000000 " face ="helvetica, arial " > < a name ="XPathExpressionCacheType " > class < strong > XPathExpressionCacheType</ strong > </ a > (< a href ="__builtin__.html#object " > __builtin__.object</ a > )</ font > </ td > </ tr >
48+
49+ < tr bgcolor ="#ffc8d8 " > < td rowspan ="2 " > < tt > </ tt > </ td >
50+ < td colspan ="2 " > < tt > < a href ="#XPathExpressionCacheType " > XPathExpressionCacheType</ a > - The type of the XPath Expression Cache.< br />
51+ < br />
52+ This is meant to be used as a singleton, the instance being "XPathExpressionCache"< br /> </ tt > </ td > </ tr >
53+ < tr > < td > </ td >
54+ < td width ="100% " > Methods defined here:< br />
55+ < dl > < dt > < a name ="XPathExpressionCacheType-__init__ " > < strong > __init__</ strong > </ a > (self)</ dt > < dd > < tt > __init__ - Create this < a href ="__builtin__.html#object " > object</ a > </ tt > </ dd > </ dl >
56+
57+ < dl > < dt > < a name ="XPathExpressionCacheType-applyCachedExpressionIfAvailable " > < strong > applyCachedExpressionIfAvailable</ strong > </ a > (self, expressionStr, xpathExpressionObj)</ dt > < dd > < tt > applyCachedExpressionIfAvailable - Check if a cached compiled expression < a href ="__builtin__.html#object " > object</ a > is available, based on the xpath expression string,< br />
58+ < br />
59+ and if it is, update the expression < a href ="__builtin__.html#object " > object</ a > 's members with the cached version.< br />
60+ < br />
61+ < br />
62+ @param expressionStr <str> - The XPath expression str< br />
63+ < br />
64+ @param xpathExpressionObj <xpath.expression.XPathExpression> - The expression < a href ="__builtin__.html#object " > object</ a > < br />
65+ < br />
66+ < br />
67+ @return <bool> - True if did apply from cache, False if no match (expression needs to be compiled)</ tt > </ dd > </ dl >
68+
69+ < dl > < dt > < a name ="XPathExpressionCacheType-getCachedExpression " > < strong > getCachedExpression</ strong > </ a > (self, expressionStr)</ dt > < dd > < tt > getCachedExpression - Try to get a cached XPathExpression < a href ="__builtin__.html#object " > object</ a > for a given key< br />
70+ < br />
71+ < br />
72+ @param expressionStr <str> - The XPath expression str< br />
73+ < br />
74+ < br />
75+ @return <XPathExpression/None> - The XPathExpression < a href ="__builtin__.html#object " > object</ a > , if one was cached, otherwise None</ tt > </ dd > </ dl >
76+
77+ < dl > < dt > < a name ="XPathExpressionCacheType-setCachedExpression " > < strong > setCachedExpression</ strong > </ a > (self, expressionStr, xpathExpressionObj)</ dt > < dd > < tt > setCachedExpression - Sets the expression < a href ="__builtin__.html#object " > object</ a > to be cached under a given string< br />
78+ < br />
79+ < br />
80+ @param expressionStr <str> - The XPath expression str< br />
81+ < br />
82+ @param xpathExpressionObj <XPathExpression> - The XPathExpression < a href ="__builtin__.html#object " > object</ a > </ tt > </ dd > </ dl >
83+
84+ < hr />
85+ Static methods defined here:< br />
86+ < dl > < dt > < a name ="XPathExpressionCacheType-getKeyForExpressionStr " > < strong > getKeyForExpressionStr</ strong > </ a > (expressionStr)</ dt > < dd > < tt > getKeyForExpressionStr - Get a unique hash "key" for a given expression str,< br />
87+ < br />
88+ as will be used to cache the compiled expression.< br />
89+ < br />
90+ < br />
91+ @param expressionStr <str/unicode/bytes> - The XPath expression str< br />
92+ < br />
93+ < br />
94+ @return <str> - The key</ tt > </ dd > </ dl >
95+
96+ < hr />
97+ Data descriptors defined here:< br />
98+ < dl > < dt > < strong > __dict__</ strong > </ dt >
99+ < dd > < tt > dictionary for instance variables (if defined)</ tt > </ dd >
100+ </ dl >
101+ < dl > < dt > < strong > __weakref__</ strong > </ dt >
102+ < dd > < tt > list of weak references to the object (if defined)</ tt > </ dd >
103+ </ dl >
104+ </ td > </ tr > </ table > </ p > </ td > </ tr > </ table > < p >
105+ < table cellpadding ="2 " width ="100% " border ="0 " cellspacing ="0 " summary ="section " >
106+ < tr bgcolor ="#55aa55 " >
107+ < td colspan ="3 " valign ="bottom " > < br />
108+ < font color ="#ffffff " face ="helvetica, arial " > < big > < strong > Data</ strong > </ big > </ font > </ td > </ tr >
109+
110+ < tr > < td bgcolor ="#55aa55 " > < tt > </ tt > </ td > < td > </ td >
111+ < td width ="100% " > < strong > XPathExpressionCache</ strong > = <AdvancedHTMLParser.xpath._cache.XPathExpressionCacheType object>< br />
112+ < strong > __all__</ strong > = ('XPathExpressionCache', 'XPathExpressionCacheType')</ td > </ tr > </ table >
113+ </ p > </ p > </ p > </ body > </ html >
0 commit comments