avatar brianteeman
brianteeman
25 Apr 2016

Havent used it for while but today the feeling lucky button always returned the exact same item. Tried it about 5 different times before I recorded this video.

screen shot 2016-04-25 at 14 40 28

avatar brianteeman brianteeman - open - 25 Apr 2016
avatar brianteeman
brianteeman - comment - 25 Apr 2016

And whatever was causing this behaviour has now stopped - weird


This comment was created with the J!Tracker Application at issues.joomla.org/jtracker/780.

avatar mbabker
mbabker - comment - 25 Apr 2016

Unless there's something being cached somewhere, you'd think your luck wouldn't be so bad...

https://github.com/joomla/jissues/blob/master/src/App/Tracker/Model/IssueModel.php#L368

avatar brianteeman
brianteeman - comment - 25 Apr 2016

Must have been some sort of cache somewhere

On 25 April 2016 at 21:07, Michael Babker notifications@github.com wrote:

Unless there's something being cached somewhere, you'd think your luck
wouldn't be so bad...

https://github.com/joomla/jissues/blob/master/src/App/Tracker/Model/IssueModel.php#L368


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#780 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar mbabker
mbabker - comment - 5 Sep 2016

So something's definitely getting cached somewhere because I just hit the button three times and hit the same issue. We should probably add a filter to that query so it excludes the issue you're already viewing if you're on an issue page at least.

avatar brianteeman
brianteeman - comment - 6 Sep 2016

That filter would be just a band aid though - it wouldnt address the root
cause that there is something being cached that you are not currently aware
of

avatar mbabker
mbabker - comment - 6 Sep 2016

Well, yes and no. Maybe there is no cache and the query just so happens to return the same result for whatever reason, or maybe MySQL is caching results since it's not something on the PHP side. Feeding an additional filter into the query makes it less likely to hit that cache if it is existing, and if it isn't there then it's just a good guarantee you don't hit the same result again.

avatar mbabker mbabker - change - 26 Sep 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-09-26 09:51:19
Closed_By mbabker
avatar mbabker mbabker - close - 26 Sep 2016
avatar zero-24
zero-24 - comment - 26 Sep 2016

hmm strang. This does not fix the complete issue ?

https://issues.joomla.org/
--> Feeling Lucky
=> 8437
--> Feeling Lucky
=> 11976
--> Feeling Lucky
=> 11976
--> Feeling Lucky
=> 11976
--> Feeling Lucky
=> 11976
...

Or is the code not live yet?

avatar mbabker
mbabker - comment - 26 Sep 2016

I think it's just you ?

Just tried it 5 times and got 5 different items.

avatar mbabker
mbabker - comment - 26 Sep 2016

Check your browser and see if the request for https://issues.joomla.org/tracker/joomla-cms/random is getting cached. That might be your issue.

avatar zero-24
zero-24 - comment - 26 Sep 2016

Correct. If i disable caching it works. Thanks! ?

avatar mbabker
mbabker - comment - 26 Sep 2016

The code's issuing a no-cache directive now too. There might be a few other places we need to do that.

Add a Comment

Login with GitHub to post a comment