Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

The "Store data in a custom cache type" code example does NOT indicate the unit of time for the TTL argument

Open
#321 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
php
Domain
documentation

Research direction

Open the linked custom cache type topic and inspect the code example containing the 86400 TTL argument. Check the underlying Magento cache implementation to establish the time unit; done means the example explicitly states the unit and provides guidance for determining it when needed.

Written by the indexing model from the issue text.

Description

Is there an existing issue for this?
  • I have searched the existing issues
Which topic?

https://developer.adobe.com/commerce/php/development/cache/partial/cache-type/

What's wrong with the content?

The code example given for saving data in a custom cache type does not indicate the unit of time the TTL argument.
This is the example:

$cacheKey  = \VendorName\ModuleName\Model\Cache\Type\CacheType::TYPE_IDENTIFIER;
$cacheTag  = \VendorName\ModuleName\Model\Cache\Type\CacheType::CACHE_TAG;

$storeData = $this->cache->save(
    $this->serializer->serialize($cacheData),
    $cacheKey,
    [$cacheTag],
    86400
);

Is 86400 in seconds? In minutes? etc
The underlying magento code itself also does not indicate the unit of time.

What changes do you propose?

Update the code example to explicitly state what unit of time magento is using, or if that's not easily discernible then at least provide explanations and guidance on how to find out.
It's important to know the unit of time.

Anything else that can help to cover this?

No response

Dominant language
JavaScript
Stars
11
Forks
178
Avg merge
1d 3h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AdobeDocs/commerce-php

All issues in AdobeDocs/commerce-php

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.