Closed (fixed)
Project:
Schema App
Version:
8.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2019 at 13:26 UTC
Updated:
31 Oct 2019 at 14:54 UTC
Jump to comment: Most recent
The schemaapp.module uses the \Drupal::request()->getRequestUri() which includes the query string. This would lead to bloating the cached schema app data. Examples: multiple cached data for a single page using an exposed view form, any query string added by the visitor.
Also, the module caches multiple times for different ordering of the query string parameters. Example: "path?a=1&b=2" vs "path?b=2&a=1".
If schemaap.com does not allow targeting by query string, then the module should use the url of the page without the query string and fragment.
Comments
Comment #2
joelcummings commentedThis is currently configurable if you want to ignore url params. In the settings of Schema App you can select (via the checkbox) to disable using url params. Does this satisfy your usecase?
Comment #3
recrit commentedMy concern is solely on the Drupal side. Since caching with query parameters is the goal, then at least this module should sort the query string to avoid duplicate cache for different order of the same parameters.
This module creates its own cache key to store data in the generic cache storage in \Drupal::cache(). The $pageUrl used to create the SchemaAppCache object is the url obtained from \Drupal::request()->getRequestUri(). This url has the query parameters unsorted.
Comment #4
joelcummings commentedDone in new release: https://www.drupal.org/project/schemaapp/releases/8.x-1.1