import jingrow
from jingrow.core.utils import find


def execute():
	jingrow.reload_pagetype("Jcloud Settings")
	settings = jingrow.get_single("Jcloud Settings")
	if not settings.redis_cache_size:
		redis_cache_size_field = find(settings.meta.fields, lambda x: x.fieldname == "redis_cache_size")
		settings.redis_cache_size = redis_cache_size_field.default
		settings.save()
