We created a custom pagelist source as described here by Richard. So we have a class that implements IDatasource and returns an array of items.
The returned item set can be different for each language - we do have a lot of languages and some items are not created in all languages and we intentionally have no fallback.
The datasource is working fine... on the first call. We noticed that when we switch language the items are not correct. When a debugger is attached to our code, it is being called on a fresh start but after that it is not called anymore if we refresh the page of switch language. As we do have different results for multiple languages this goes wrong.
I assume it's some caching as it works again after a publish. Once.. and then it's cached again.
How can I make this work for multiple languages?