90 print 'cached value ("visible" view):', |
101 print 'cached value ("visible" view):', |
91 print vars(visibleview).get('testcachedfoobar', 'NOCACHE') |
102 print vars(visibleview).get('testcachedfoobar', 'NOCACHE') |
92 print 'cached value ("immutable" view):', |
103 print 'cached value ("immutable" view):', |
93 print vars(immutableview).get('testcachedfoobar', 'NOCACHE') |
104 print vars(immutableview).get('testcachedfoobar', 'NOCACHE') |
94 |
105 |
|
106 # unfiltered property cache test |
|
107 print '' |
|
108 print '' |
|
109 print '=== unfiltered property cache ===' |
|
110 print '' |
|
111 print 'unficalllog:', unficalllog |
|
112 print 'cached value (unfiltered): ', |
|
113 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
114 print 'cached value ("visible" view): ', |
|
115 print vars(visibleview).get('testcachedunfifoobar', 'NOCACHE') |
|
116 print 'cached value ("immutable" view):', |
|
117 print vars(immutableview).get('testcachedunfifoobar', 'NOCACHE') |
|
118 |
|
119 print '' |
|
120 print '= first access on unfiltered, should do a call' |
|
121 print 'access (unfiltered):', repo.testcachedunfifoobar |
|
122 print 'unficalllog:', unficalllog |
|
123 print 'cached value (unfiltered): ', |
|
124 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
125 |
|
126 print '' |
|
127 print '= second access on unfiltered, should not do call' |
|
128 print 'access (unfiltered):', repo.testcachedunfifoobar |
|
129 print 'unficalllog:', unficalllog |
|
130 print 'cached value (unfiltered): ', |
|
131 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
132 |
|
133 print '' |
|
134 print '= access on view should use the unfiltered cache' |
|
135 print 'access (unfiltered): ', repo.testcachedunfifoobar |
|
136 print 'access ("visible" view): ', visibleview.testcachedunfifoobar |
|
137 print 'access ("immutable" view):', immutableview.testcachedunfifoobar |
|
138 print 'unficalllog:', unficalllog |
|
139 print 'cached value (unfiltered): ', |
|
140 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
141 print 'cached value ("visible" view): ', |
|
142 print vars(visibleview).get('testcachedunfifoobar', 'NOCACHE') |
|
143 print 'cached value ("immutable" view):', |
|
144 print vars(immutableview).get('testcachedunfifoobar', 'NOCACHE') |
|
145 |
|
146 print '' |
|
147 print '= even if we clear the unfiltered cache' |
|
148 del repo.__dict__['testcachedunfifoobar'] |
|
149 print 'cached value (unfiltered): ', |
|
150 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
151 print 'cached value ("visible" view): ', |
|
152 print vars(visibleview).get('testcachedunfifoobar', 'NOCACHE') |
|
153 print 'cached value ("immutable" view):', |
|
154 print vars(immutableview).get('testcachedunfifoobar', 'NOCACHE') |
|
155 print 'unficalllog:', unficalllog |
|
156 print 'access ("visible" view): ', visibleview.testcachedunfifoobar |
|
157 print 'unficalllog:', unficalllog |
|
158 print 'cached value (unfiltered): ', |
|
159 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
160 print 'cached value ("visible" view): ', |
|
161 print vars(visibleview).get('testcachedunfifoobar', 'NOCACHE') |
|
162 print 'cached value ("immutable" view):', |
|
163 print vars(immutableview).get('testcachedunfifoobar', 'NOCACHE') |
|
164 print 'access ("immutable" view):', immutableview.testcachedunfifoobar |
|
165 print 'unficalllog:', unficalllog |
|
166 print 'cached value (unfiltered): ', |
|
167 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
168 print 'cached value ("visible" view): ', |
|
169 print vars(visibleview).get('testcachedunfifoobar', 'NOCACHE') |
|
170 print 'cached value ("immutable" view):', |
|
171 print vars(immutableview).get('testcachedunfifoobar', 'NOCACHE') |
|
172 print 'access (unfiltered): ', repo.testcachedunfifoobar |
|
173 print 'unficalllog:', unficalllog |
|
174 print 'cached value (unfiltered): ', |
|
175 print vars(repo).get('testcachedunfifoobar', 'NOCACHE') |
|
176 print 'cached value ("visible" view): ', |
|
177 print vars(visibleview).get('testcachedunfifoobar', 'NOCACHE') |
|
178 print 'cached value ("immutable" view):', |
|
179 print vars(immutableview).get('testcachedunfifoobar', 'NOCACHE') |