mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
Cache registration info html in memcache.
This commit is contained in:
@@ -960,12 +960,15 @@ class Register(Login):
|
||||
|
||||
class RegistrationInfo(Templated):
|
||||
def __init__(self):
|
||||
wp = WikiPage.get(Frontpage, g.wiki_page_registration_info)
|
||||
html = unsafe(
|
||||
wikimarkdown(wp.content, include_toc=False, target='_blank')
|
||||
)
|
||||
html = unsafe(self.get_registration_info_html())
|
||||
Templated.__init__(self, content_html=html)
|
||||
|
||||
@classmethod
|
||||
@memoize('registration_info_html', time=10*60)
|
||||
def get_registration_info_html(cls):
|
||||
wp = WikiPage.get(Frontpage, g.wiki_page_registration_info)
|
||||
return wikimarkdown(wp.content, include_toc=False, target='_blank')
|
||||
|
||||
|
||||
class OAuth2AuthorizationPage(BoringPage):
|
||||
def __init__(self, client, redirect_uri, scope, state, duration):
|
||||
|
||||
Reference in New Issue
Block a user