"""
Utils module for the eccard app.
"""
from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache


class NeverCacheMixin:  # pylint: disable=R0903
    """
    Never cache the view using this mixin.
    """

    @method_decorator(never_cache)
    def dispatch(self, *args, **kwargs):
        """
        Call the required method handler.
        """
        return super().dispatch(*args, **kwargs)
