Skip to content

Debugging

Matthias Isler edited this page Jan 8, 2018 · 1 revision

If you experience any issues while using Lada Cache, especially if outdated data is returned by one of your queries, you can easily debug the problem by yourself.

First of all, please install Laravel Debugbar. Lada Cache ships with an integration for it, you'll see a tab 'Lada' as soon as you got it set up:

As you can see, it lists all queries fired by your application. Queries which already exist in the cache and are not actually executed against the database are marked with "Hit", while queries which are executed and later on added to the cache are marked with "Miss". Write queries which invalidate data are marked with "Invalidation" and the corresponding type. If you click on a query, you'll see additional information like the generated hash, the tags or the query parameters.

Now debugging is rather simple:

  1. Check the tags generated by your read query
  2. Check the tags generated by your write query
  3. Compare the tags. If your write query should invalidate a read query but doesn't generate matching tags, it's a bug.

Please note that "Hit" queries do not appear in the "Queries" tab of the Debugbar.

Clone this wiki locally