예제 #1
0
def save_toc(toc):
	global toc_cache
	toc_cache = toc

	sefaria.db.summaries.remove({"name": "toc"})		
	sefaria.db.summaries.save({"name": "toc", "contents": toc})
	sefaria.delete_template_cache("texts_list")
예제 #2
0
def save_toc(toc):
    global toc_cache
    toc_cache = toc

    sefaria.db.summaries.remove({"name": "toc"})
    sefaria.db.summaries.save({"name": "toc", "contents": toc})
    sefaria.delete_template_cache("texts_list")
예제 #3
0
def save_toc(toc):
	"""
	Saves the table of contents object to in-memory cache,
	invalidtes texts_list cache.
	"""
	global toc_cache
	toc_cache = toc
	sefaria.delete_template_cache("texts_list")
예제 #4
0
def save_toc(toc):
	global toc_cache
	toc_cache = toc
	sefaria.delete_template_cache("texts_list")