1
0
forked from VimPlug/jedi

caches have their own module now.

This commit is contained in:
David Halter
2012-12-12 21:28:19 +01:00
parent 169b35b5a9
commit e8ddc35a1b
9 changed files with 109 additions and 97 deletions

View File

@@ -3,6 +3,9 @@
import re
import os
import cache
import dynamic
import helpers
import settings
import evaluate
import imports
@@ -10,6 +13,20 @@ import parsing
import keywords
def _clear_caches():
"""
Clears all caches of this and related modules. The only cache that will not
be deleted is the module cache.
"""
cache.clear_caches()
dynamic.search_param_cache.clear()
helpers.ExecutionRecursionDecorator.reset()
evaluate.follow_statement.reset()
imports.imports_processed = 0
class BaseDefinition(object):
_mapping = {'posixpath': 'os.path',
'riscospath': 'os.path',
@@ -193,7 +210,7 @@ class Completion(BaseDefinition):
self._followed_definitions = \
[BaseDefinition(d, d.start_pos) for d in defs]
evaluate.clear_caches()
_clear_caches()
return self._followed_definitions