def build_site_cache(self, force=False):
        # if not self.is_prepared:
        #     self.prepare_layouts()
        #     self.is_prepared = True

        if settings.SITE.never_build_site_cache:
            logger.debug(
                "Not building site cache because `settings.SITE.never_build_site_cache` is True")
            return
        if not os.path.isdir(settings.MEDIA_ROOT):
            logger.debug(
                "Not building site cache because " +
                "directory '%s' (settings.MEDIA_ROOT) does not exist.",
                settings.STATIC_ROOT)
            return

        started = time.time()
        # logger.info("20140401 build_site_cache started")

        settings.SITE.on_each_app('setup_site_cache', force)

        settings.SITE.makedirs_if_missing(
            os.path.join(settings.MEDIA_ROOT, 'upload'))
        settings.SITE.makedirs_if_missing(
            os.path.join(settings.MEDIA_ROOT, 'webdav'))

        if force or settings.SITE.build_js_cache_on_startup:
            count = 0
            for lng in settings.SITE.languages:
                with translation.override(lng.django_code):
                    for profile in UserProfiles.objects():
                        count += jsgen.with_user_profile(
                            profile, self.build_js_cache, force)
            logger.info("%d lino*.js files have been built in %s seconds.",
                        count, time.time() - started)
take a string and prepend a serialized binary representation of its
dataset/ETHPy150Open lsaffre/lino/lino/modlib/extjs/ext_renderer.py/ExtRenderer.build_site_cache--crossover with--dataset/ETHPy150Open ufora/ufora/ufora/distributed/ServerUtils/SimpleServer.py/prependSizePrefix