def company_index(request): cache_key = get_cache_key(request) res = cache.get(cache_key) if res is None: res = serializers.get_enterprises() cache.set(cache_key, res, 60) return Response({'companies':res}, template_name = 'accounts/companies.html')
def company_index(request): res = serializers.get_enterprises() return Response({'companies':res}, template_name = 'accounts/companies.html')