On second thought I'm not too sure if the Cache dir's are more appropriate for the Database. According to the spec "$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used."
it is the location where non essential data files should be stored. The database is an essential file for baloo to function so I'm not sure if we should put it in the cache dir.