This reverts commit 74cb87bea0.
This was done because I noticed this first commit was unnecessary.
This original commit was written in order to allow tests where
the cache would return errors, but I noticed there is a way
of provoking these errors without the need of an extra layer
of abstraction.
Thus, in order to keep the code simpler and also avoid an extra
level of indirection I am undoing this change.
As known, a map can't be accessed with read/write concurrently on
multiple goroutines. This just replaces all uses of global maps for
caches with sync.Map, which is safe to be used concurrently.
Some databases (maybe all of them) will set the database column
names to lowercase.
This was problematic because we needed to match these names
with the ksql tags, which were not lowercased.
Now we support both versions, lowercased or not.