zeeguu/core/model/articles_cache.py
def calculate_hash(user, topics, filters, searches, search_filters, user_languages):
        def _join_ids(a_list: list):
            return ",".join([str(l.id) for l in a_list])

        """

         This method is to calculate the hash with all the content filters.
         It simply adds a letter for the type of content and the sorted ids
         of all the content that has been added.
        :return:

        """

        result = "lan: "
        from zeeguu.core.model import User

        for each in user_languages:
            result += f"{each.code} " + str(User.levels_for(user, each))

        return (
            result
            + " top: "
            + _join_ids(topics)
            + " sear: "
            + _join_ids(searches)
            + " filt: "
            + _join_ids(filters)
            + " sear-filt: "
            + _join_ids(search_filters)
        )


         This method is to calculate the hash with all the content filters.
         It simply adds a letter for the type of content and the sorted ids
         of all the content that has been added.
        :return:

        
This method is to calculate the hash with all the content filters.
It simply adds a letter for the type of content and the sorted ids
of all the content that has been added.
This method is to calculate the hash with all the content filters . It simply adds a letter for the type of content and the sorted ids of all the content that has been added .
def calculate_hash(user, topics, filters, searches, search_filters, user_languages):
        def _join_ids(a_list: list):
            return ",".join([str(l.id) for l in a_list])
        result = "lan: "
        from zeeguu.core.model import User
        for each in user_languages:
            result += f"{each.code} " + str(User.levels_for(user, each))
        return (
            result
            + " top: "
            + _join_ids(topics)
            + " sear: "
            + _join_ids(searches)
            + " filt: "
            + _join_ids(filters)
            + " sear-filt: "
            + _join_ids(search_filters)
        )
def calculate_hash ( user , topics , filters , searches , search_filters , user_languages ) : def _join_ids ( a_list : list ) : return "," . join ( [ str ( l . id ) for l in a_list ] ) result = "lan: " from zeeguu . core . model import User for each in user_languages : result += f"{each.code} " + str ( User . levels_for ( user , each ) ) return ( result + " top: " + _join_ids ( topics ) + " sear: " + _join_ids ( searches ) + " filt: " + _join_ids ( filters ) + " sear-filt: " + _join_ids ( search_filters ) )
This method is to calculate the hash with all the content filters.
This method is to calculate the hash with all the content filters .
"""

         This method is to calculate the hash with all the content filters.
         It simply adds a letter for the type of content and the sorted ids
         of all the content that has been added.
        :return:

        """
None
user
topics
filters
searches
search_filters
user_languages