Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached is a patch to allow users to set a custom time length for a cache to expire (ie 3 minutes, 1.5 days, etc...). The patch adds a "custom" option to the time drop down select. When "custom" is chosen for either output or results cache's then a text field appears where someone can enter a number of seconds for the cache to last for.
Comment | File | Size | Author |
---|---|---|---|
#3 | views-1471200-3.patch | 4.41 KB | tim.plunkett |
#2 | custom-cache-time-1471200-2.patch | 4.33 KB | bigjim |
custom-cach-time.patch | 4.09 KB | bigjim | |
Comments
Comment #1
tim.plunkettThese lines could probably be combined.
wrap in t()
wrap in t()
missing space after comma
would this need an isset() to prevent notices?
missing space after comma
Comment #2
bigjim CreditAttribution: bigjim commentedAll except the isset() re-rolled here. On the isset() question I believe it's not needed as event the "never cache" options returns a -1 for the first condition of the if() so there is always a value.
Comment #3
tim.plunkettRerolled for git credit for @jalama, and adding full stops to the end of a string. I don't think this needs tests, since its really a UI thing.
The validate works, it gets exported properly, and the UI works.
Comment #4
dawehnerThanks! Committed to 7.x-3.x
Comment #5
MustangGB CreditAttribution: MustangGB commented