Used to cache the bundle definitions rather than loading from config every time they're used

def get_bundles():
    """
    Used to cache the bundle definitions rather than loading from config every time they're used
    """
    global _cached_bundles

    if not _cached_bundles:
        _cached_bundles = BundleManager()

        for bundle_conf in bundles_settings.BUNDLES:
            _cached_bundles[bundle_conf[0]] = Bundle(bundle_conf)

    return _cached_bundles