SMF icon indicating copy to clipboard operation
SMF copied to clipboard

SMF file caching is messed up

Open Arantor opened this issue 13 years ago • 24 comments

At some point previously in the dev cycle, the move was made to pull the cache parameters to Settings.php, which makes sense - means they can be used even to cache the $modSettings values.

Only it doesn't look like it was done completely... I see plenty of uses of $modSettings['cache_enable'] that need looking at.

Arantor avatar Oct 09 '13 04:10 Arantor

Just in case you missed it: https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/ManageServer.php#L407 ;)

emanuele45 avatar Oct 10 '13 12:10 emanuele45

Um, so the two are kept in sync. I still don't get why $cache_enable wasn't used everywhere.

Arantor avatar Oct 10 '13 17:10 Arantor

No idea, maybe it was faster like that...

emanuele45 avatar Oct 10 '13 19:10 emanuele45

I can't imagine a situation where it would be faster.

Arantor avatar Oct 10 '13 19:10 Arantor

I meant faster to do. :innocent:

emanuele45 avatar Oct 10 '13 20:10 emanuele45

That's the point, I can't see how it could be faster. OK, so you have to bring a variable into scope, sure, but the cost of calls to that variable once in scope should be cheaper than looking up an entry in the hashtable for $modSettings.

Arantor avatar Oct 10 '13 21:10 Arantor

Probably another misunderstanding: it was a faster change to apply. Nothing to do with execution time, just with practical implementation of the new behaviour. ;)

And, backward compat with mods (since at the time it was one of the most important points): both in terms of expected variables in scope and expected characters in a certain position.

emanuele45 avatar Oct 11 '13 08:10 emanuele45

Ahhhhh, I see now.

Arantor avatar Oct 11 '13 13:10 Arantor

So is this a bug or not or other? Does this thing work or is it "messed up" as the title states?

deliciousbamboo avatar Oct 13 '13 22:10 deliciousbamboo

Well, it would appear that it is not a bug but a word in progress that was left as it was by people who worked on the repository before I did, which at a glance did appear to be messed up - but after the conversation it wasn't. Misunderstandings do happen when dealing with 100k+ lines of code.

Arantor avatar Oct 13 '13 23:10 Arantor

was wanting to take a look if it was a problem, want to figure out if I can help here or no

deliciousbamboo avatar Oct 13 '13 23:10 deliciousbamboo

Quite frankly given your attitude, I'm not sure we'd actually want your help.

Arantor avatar Oct 14 '13 00:10 Arantor

I see .. I though tis was an OS project that wanted people to join, even if they had a different view, guess not, thanks for being clear.

deliciousbamboo avatar Oct 14 '13 00:10 deliciousbamboo

Oh, people helping is fine. People jumping in, commenting on issues they even admit they don't understand (cf $smcFunc['htmlspecialchars']) and generally being unpleasant is not fine.

To contribute does imply working as a team and all you're doing is spreading bile.

Arantor avatar Oct 14 '13 00:10 Arantor

your being most unpleasant, why you on team?

deliciousbamboo avatar Oct 14 '13 00:10 deliciousbamboo

Ask the rest of the team, they'd tell you I wasn't particularly unpleasant. On the other hand, coming here and spreading bile straight off the bat - over a misunderstanding - and you wonder why I'm getting defensive.

How would you feel if the situation was reversed and I came to your project and acted how you have?

I think this discussion is futile, please stop this.

Arantor avatar Oct 14 '13 00:10 Arantor

I think this discussion is futile, please stop this.

insult again and then say stop, so you can have final word ... so far "team" call me troll, puppet and bile .. team did the wrong thing.

deliciousbamboo avatar Oct 14 '13 00:10 deliciousbamboo

What were we supposed to do? We admit we made a mistake, and we rectified it. Everything else has been about responding to your less than pleasant commentary.

Arantor avatar Oct 14 '13 00:10 Arantor

If this is a work in progress, any idea where the person/people was/were working before they dropped it?

NanoSector avatar Oct 14 '13 14:10 NanoSector

Basically if you read everything up to before deliciousbamboo's comment, it's totally clear where things got to: not breaking backwards compatibility.

Arantor avatar Oct 14 '13 17:10 Arantor