Migration: Wrapper Version 1.7.0

Introduction

This guide outlines the changes introduced in version 1.7.0.

Modified Default Value for Request Statistics Keep Days

The Wrapper cache setting Request Statistics Keep Days now defaults to 0 for new workspaces. This means that, unless explicitly enabled, statistics will not be collected.

  • Existing workspaces keep their current configuration. For workspaces without an explicit configuration, a value of seven days is applied to keep the behavior consistent.
  • This setting can be reviewed and adjusted at any time in SPARQUE Hub.

For optimal cache performance, we recommend setting this value to 0.

Why This Change?

When enabled, the Request Statistics feature records request payloads and timestamps in Redis. These entries are only used by:

  • The statistics usage API (/admin/cache-statistics)
  • The cache refresh endpoint (/cache/refresh)

However, this functionality is not typically needed in day-to-day operations and can:

  • Provide only limited statistics
  • Increase cache size with infrequent requests
  • Add extra traffic against SPARQUE APIs

Disabling statistics collection by default allows new workspaces to benefit from:

  • Lean and efficient caching
  • Reduced Redis usage
  • Lower API traffic
  • Simpler configuration out of the box

Full flexibility to enable and configure statistics collection is still available if it is valuable for your use case.

Improved Mapping of Category Facet Options

Affected Endpoints

  • /api/v2/facet-options and newer
  • /api/v2/products and newer
  • /api/v2/search and newer

Changes

The Wrapper API response for the fixed facet category has been extended to include additional attributes provided by SPARQUE.AI for the individual categories.

{
    "id": "https://www.sparque.ai/ish/category/network-cables",
    "identifier": "network-cables",
    "score": 25.0,
    "value": "Network Cables",
    "localizedNames": {[...]},
    "localizedValues": {[...]},
    "childFacets": [],
    "attributes": [
        {
            "name": "image",
            "value": "M/28918-6725.jpg"
        },
        {
            "name": "online",
            "value": 1
        },
        {
            "name": "root",
            "value": 0
        }
    ]
}

This extended response is only present for the category facet when the corresponding Hub setting Category Facet is enabled.

Required SPARQUE Changes

Any additional data provided via SPARQUE's /category_facets endpoint will automatically be mapped to the new attributes element. If you do not need this mapping, consider adjusting the result description to keep the response as lean as possible.