What are Uri Params in Lesti_Fpc?

I have changed the keys in Lesti_Fpc 1.1.1. There was a problem with parameters in the Cache. Not a real problem, but the cache has produced too much keys. That means, more memory for the cache, but the real problem was, the cache had too much misses.

How does Lesti_Fpc generates key?

A key is the identifier of an object. In this case of a page in your website. Other full page caches are using the url as a key. The good thing about that, you have more hits. The bad thing, you can't make a difference between currencies and parameters in the user session. For example the count of products in the category. That's the reason for an internal cache. I did need the parameters of the session. The cache builds a hash from these parameters. Here is a diagramm to show how Lesti_Fpc has build keys in the past.

Uri Params 1

This is the key after visiting a category page. If I visit the same category with a senseless parameter, the cache generates a new key.

Uri Params 2

That produces too much misses.

The solution

The solution was very easy. I replaced the uri with the full_action_name. But now I can't make a difference between two products. So I added a field in the configurations. You have to decide, which parameters in the uri have an effect on the hash-key.

Uri Params

The default parameters in the uri are:

  • id
  • category
  • page_id
  • p
  • limit
  • dir
  • order
  • mode
You can add your own parameters in the configuration. Other parameters have no effect on the key. That should produce more hits.

Next Previous