def clear_cache():
    """
    Clear internal cache of apps loading
    """
    import django
    if django.VERSION >= (1.7):
        try:
            from django.db.models import loading
            loading.cache.loaded = False
        except ImportError:  # Django >= 1.9
            pass
    else:
        from django.apps import apps
        apps.clear_cache()
dataset/ETHPy150Open edoburu/django-parler/parler/tests/utils.py/clear_cache/original