blob: 5999f281a4a5d28ac4a1816f74d8ebda49a59120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import gc
from portage.util.listdir import dircache
def clear_caches(trees):
for d in trees.values():
d["porttree"].dbapi.melt()
d["porttree"].dbapi._aux_cache.clear()
d["bintree"].dbapi._aux_cache.clear()
d["bintree"].dbapi._clear_cache()
d["vartree"].dbapi.linkmap._clear_cache()
dircache.clear()
gc.collect()
|