Closed Thorium closed 4 years ago
In general, most users will come with the expectation/idea that there is something they can do to the TP invocation to trigger the TP to invalidate any cached info it gathered. I would suggest adding an argument, such as Invalidate=true/false
as well.
(There is a typo in the error message in your commit.)
@granicz I'm not familiar with this mechanism, I tried to add new argument ProvidedStaticParameter("Invalidate",typeof<bool>,false)
and then handling:
let invalidateCache = args.[12] :?> bool
if invalidateCache then
(this :> ITypeProvider).Invalidate.Add(fun _ ->
DesignTimeCache.cache.Clear()
)
...but it didn't work.
Database schema is cached lazily meanwhile you use it. Sometimes your schema may change meanwhile you develop your code, and you would like to invalidate the database schema cache without restarting your IDE. This can be done via method
.``Design Time Commands``.ClearDatabaseSchemaCache().