xWiki Document different state as Database

Hello,

when I query the database for a specific content (doc.content LIKE ‘%something%’) I get the results like in the database. but when i open the document in xwiki i have a different content. Is there some sort of cache or something?

Thanks yall!

There’s a doc cache in memory but it’s synced with the DB, so there should be no difference.

Its weird. Im working on a script which replaces specific word snippets in documents and create translations.

When I create a document, I have the created document in the xwikidoc table. (All normal)
When I replace the content and create the translations of the document (with the script), I have the changes in the UI (i can switch the language and so on and see the different versions). In the database are also both records (original + translation) right.

Now when I run the script again, it still tells me that the records i just updated have these specific words in it.

To query the documents at the beginning of the script (with the condition to find the text to replace) i use the following:

List<String> documentsUnfiltered = (
            allSpaces
                    ? services.query
                    .hql("select doc.fullName from XWikiDocument doc where doc.fullName not like 'XWiki.%' and doc.fullName not like 'Macro.%' and doc.fullName not like 'Migrator.WebHome' and doc.content like :searchContent")
                    : services.query
                    .hql("select doc.fullName from XWikiDocument doc where doc.fullName like :spacePrefix and doc.fullName not like 'Macro.%' and doc.fullName not like 'Migrator.WebHome' and doc.content like :searchContent")
                    .bindValue('spacePrefix', spacePrefix.toString())
).bindValue('searchContent').anyChars().literal(sanitizedSearchString).anyChars().query().execute();