예제 #1
0
    def get_titles(cls, user=None):
        email = user.email() if user is not None else u'None'
        titles = caching.get_titles(email)
        if titles is None:
            titles = {page.title for page in cls.get_index(user)}
            caching.set_titles(email, titles)

        return titles
예제 #2
0
    def get_titles(cls, user=None):
        email = user.email if (user is not None and not user.is_anonymous) else u'None'
        titles = caching.get_titles(email)
        if titles is None:
            titles = {page.title for page in cls.get_index(user)}
            caching.set_titles(email, titles)

        return titles
예제 #3
0
    def get_titles(cls, user=None):
        email = user.email() if user is not None else u'None'
        titles = caching.get_titles(email)
        if titles is None:
            titles = {page.title for page in cls.get_index(user)}
            caching.set_titles(email, titles)

        return titles