Created
May 15, 2009 17:07
-
-
Save rtyler/112306 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def respond(self, trans=None): | |
| ## CHEETAH: main method generated for this template | |
| if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): | |
| trans = self.transaction # is None unless self.awake() was called | |
| if not trans: | |
| trans = DummyTransaction() | |
| _dummyTrans = True | |
| else: _dummyTrans = False | |
| write = trans.response().write | |
| SL = self._CHEETAH__searchList | |
| _filter = self._CHEETAH__currentFilter | |
| ######################################## | |
| ## START - generated method body | |
| ## START CACHE REGION: ID=_40620794. line 1, col 3 in the source. | |
| _RECACHE__40620794 = False | |
| _cacheRegion__40620794 = self.getCacheRegion(regionID='_40620794', cacheInfo={'type': 2}) | |
| if _cacheRegion__40620794.isNew(): | |
| _RECACHE__40620794 = True | |
| _cacheItem__40620794 = _cacheRegion__40620794.getCacheItem('_40620794') | |
| if _cacheItem__40620794.hasExpired(): | |
| _RECACHE__40620794 = True | |
| if (not _RECACHE__40620794) and _cacheItem__40620794.getRefreshTime(): | |
| try: | |
| _output = _cacheItem__40620794.renderOutput() | |
| except KeyError: | |
| _RECACHE__40620794 = True | |
| else: | |
| write(_output) | |
| del _output | |
| if _RECACHE__40620794 or not _cacheItem__40620794.getRefreshTime(): | |
| _orig_trans_40620794 = trans | |
| trans = _cacheCollector__40620794 = DummyTransaction() | |
| write = _cacheCollector__40620794.response().write | |
| _v = VFFSL(SL,"anInt",True) # u'' on line 2, col 1 | |
| if _v is not None: write(_filter(_v, rawExpr=u'')) # from line 2, col 1. | |
| trans = _orig_trans_40620794 | |
| write = trans.response().write | |
| _cacheData = _cacheCollector__40620794.response().getvalue() | |
| _cacheItem__40620794.setData(_cacheData) | |
| write(_cacheData) | |
| del _cacheData | |
| del _cacheCollector__40620794 | |
| del _orig_trans_40620794 | |
| ## END CACHE REGION: _40620794 | |
| ######################################## | |
| ## END - generated method body | |
| return _dummyTrans and trans.response().getvalue() or "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment