Closed Bug 989089 Opened 10 years ago Closed 10 years ago

It's difficult to specify page expiration times in seconds

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect)

All
Other
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheppy, Unassigned)

References

Details

(Whiteboard: [specification][type:change])

What feature should be changed? Please provide the URL of the feature if possible.
==================================================================================
Currently, the time to expire a page (that is, to force a rebuild of the page) is entered in seconds. This is really inconvenient. It would be much better if we could set this more flexibly, with the ability to specify in terms of hours and minutes.

What problems would this solve?
===============================
This would make it much quicker and more efficient to set these expire times, and less error-prone. I worry about us accidentally setting really inappropriate times by doing our math wrong, or accidentally typing "1" meaning "1 hour" during a brain meltdown.

Who would use this?
===================
Anyone with privs to set this information; I don't know if that's global or not.

What would users see?
=====================
An appropriate widget for setting a duration in hours and minutes; ideally some kind of time control, but if not that, then a pair of edit fields: Hours and Minutes.

What would users do? What would happen as a result?
===================================================
Entering this would then do the math to compute the number of seconds and store that just as it does currently.

Is there anything else we should know?
======================================
FWIW, as we use more and more auto-built menus, and are reorganizing and adding content, we are increasingly reliant on this auto-refresh capability to keep these menus up to date, so this will become more and more useful going forward.
Severity: normal → minor
Component: General → Landing pages
Summary: Make it easier to set page expiration times → It's difficult to specify page expiration times in seconds
:sheppy, what if we changed the refesh duration to minutes, or even hours, in the UI?  Do editors need to set the refresh duration on any of our pages to less than 1 hour?
Flags: needinfo?(eshepherd)
I think changing it to be just hours would be acceptable, really. Having more flexibility than that sounds cool, but now that I think about it, it's probably unnecessary.
Flags: needinfo?(eshepherd)
Les, what do you think would be the best way to go about implementing this change in time units?

We could just change the time unit displayed in the view layer, and keep storing auto-refresh times in seconds in the database.  We could also push the change in time units all the way down into the database, and start storing times in the database in hours.  What do you recommend?
Flags: needinfo?(lorchard)
This needs some UX thought & work, which is not my strong point. I initially committed this feature noting just that - so we'd at least have the capability while we worked out how best to build the UI. I assumed someone (maybe :davidwalsh?) could come up with a frontend widget to make it more friendly.

In terms of the backend, it's probably best to leave that in seconds. The age math is done in SQL, and the less complicated we make that the better.
Flags: needinfo?(lorchard) → needinfo?(dwalsh)
I agree with leaving the backend in seconds; it saves on the amount of change needed, and gives us flexibility to be more granular with the timing later if need be.
We could add a date and time picker, and then convert to seconds on the front or back end.  Would that be easier?
Flags: needinfo?(dwalsh)
Yes, easiest (for me anyway) would be a frontend widget that calculates the time in seconds for the backend.
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/ac748a2e0b629663921f2f11979fe0bfdf6e0935
Fix bug 989089 - Add duration widget for rendering max age

https://github.com/mozilla/kuma/commit/3d8e398f7f2bcef9113575f26c949929deb396e6
Merge pull request #2420 from iakshay/989089-html5-slider

Fix bug 989089 - Add HTML5 Slider for rendering max age
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
:dwalsh, can we rework this so that the default is 0? That disables rebuilding for docs. 

Also, does this widget properly reflect the refresh time already set for a doc - even if it is 0?

We really don't want to start setting *every* doc as in need of refresh every 15 min.

For context, I just saw this on the mdn-drivers list:

On 29/05/2014 08:54, Jean-Yves Perrier wrote:
> Hi!
>
> I just noticed that we the latest push (the widget to set refresh time),
> all pages now default to refresh time of 15 minutes.
>
> Even those that were not set to be automatically refreshed.

> Will the MDN be able to handle 10000s of pages refreshing every 15
> minutes? Because, if I'm not mistaken, it is what we will reach in about
> 1-2 month.
>
> If we rollback this, please clean the DB: we already have dozens of
> pages set to refresh every 900 s.
Status: RESOLVED → REOPENED
Flags: needinfo?(dwalsh)
Resolution: FIXED → ---
Ready here:  https://github.com/mozilla/kuma/pull/2434
Flags: needinfo?(dwalsh)
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/14f974ef693efd1c66c0d8a7de5203ddc0e749e3
fix bug 989089 - Update default refresh rate for docs

https://github.com/mozilla/kuma/commit/35938f702d8edc8f22c6ede6e2d40ab407495e6f
Merge pull request #2434 from darkwing/default-refresh-989089

fix bug 989089 - Update default refresh rate for docs
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Depends on: 1018109
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.