Advertisement:

Author Topic: Caching 2.0.3  (Read 4427 times)

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Caching 2.0.3
« on: January 14, 2013, 01:24:37 PM »
I'm just browsing through everything to familiarize myself with how things work because I am a total n00b at this and saw "SMF has not been able to detect a compatible accelerator on your server" in Server Settings>Caching.

I haven't touched the code because I'm still searching for how to find that so I can try to learn it.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #1 on: January 14, 2013, 01:31:15 PM »
That's normal; most shared hosting doesn't have facilities for dedicated caching for sites, thus they don't have the caching extensions installed either.

There is always a basic file cache available, though.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #2 on: January 14, 2013, 03:18:47 PM »
Alright, thank you very much.  ^^  By chance do you know where I can find the code?  I promise not to touch anything yet.  XD

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #3 on: January 14, 2013, 03:21:20 PM »
What code, exactly? The code that is the admin area, the code that invokes the cache or the code that calls the cache for data?
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #4 on: January 14, 2013, 03:23:06 PM »
I'd like to be able to modify the site eventually and I've heard that the best way to learn is to read the code with some instructions handy.  So I figured why not learn off the code that writes the site so that I can make it look how I'd like it to while I go.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #5 on: January 14, 2013, 03:24:32 PM »
The best way is to modify the code, sure, but to try to get to learn it by looking at specific bits really isn't going to tell you much.

SMF has 110,000 lines of code in it. You won't get to understand how it works by staring at subsystems like caching. Look through the code that you want to modify specifically first of all. Even SMF experts start by looking at the code they want to change rather than knowing everything about it first.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #6 on: January 14, 2013, 03:27:20 PM »
If I don't need to mod the code for caching then I won't but I just don't know where to find any of the code.  I feel as if I've gone through the admin section and I'm still not coming across anything.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #7 on: January 14, 2013, 03:29:15 PM »
So start by looking at Admin.php to see where the menu item points to. Though I still say the caching is a bad idea for trying to get to know the system.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #8 on: January 14, 2013, 03:30:59 PM »
My question for finding the code was just inserted into this topic when I thought there was trouble with the caching.  It was completely unrelated.  Where would you recommend that I start?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #9 on: January 14, 2013, 03:34:19 PM »
Well... is there trouble with the cache exactly? What's the problem with it?

Staring at the code won't teach you anything, especially about troubleshooting.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #10 on: January 14, 2013, 03:38:34 PM »
You told me that what I was being shown was normal so I guess that there isn't actually a problem.  (Refer to first post.)

I'm trying to teach myself to code, I used to know Java but that was years ago, and since I'd like to be effective at modifying the site that I just created I'd like to learn PHP.  By cruising the forums it has been recommended that I read the code to help myself learn.  Trouble is that I don't know where to find the code or where to start.  So I was just hoping for some advice.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #11 on: January 14, 2013, 03:47:26 PM »
Yeah, I guessed you were trying to learn PHP - which is why I've been trying to steer you away from one of the more exotic and strange bits of the system that few people do understand, and towards something else.

It's like trying to learn a language from reading the dictionary - it won't tell you what you need to know.

Finding the code in SMF is easy - it all starts from the top index.php and it figures out where to go from there depending on what the user requests.

What I'd say is, figure out what you want to customise, then we can talk you through all the logic that gets to that point - just not the caching subsystem ;)
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #12 on: January 14, 2013, 03:50:35 PM »
Thank you, sorry for not coming across clearly.  ^^

At this exact moment I'm trying to figure out how to rename the site.  I realized that I still have the default "My Community Name" in the top left.  I've been looking through the code for the themes but so far I've not found it so I'm assuming that it's elsewhere.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #13 on: January 14, 2013, 03:54:26 PM »
That would be because it's not in the code.

Admin > Configuration > Server Settings > General Settings, it's in there.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #14 on: January 14, 2013, 08:47:42 PM »
Apparently I'm blind as well as a n00b.  XD

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Caching 2.0.3
« Reply #15 on: January 14, 2013, 08:48:26 PM »
Nah, it's one of those settings that a lot of people miss, mostly because it's in a strange place for a reason very few people understand.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Cheeky Stoat

  • Semi-Newbie
  • *
  • Posts: 37
Re: Caching 2.0.3
« Reply #16 on: January 14, 2013, 09:27:05 PM »
Well I did look through the admin settings because I didn't think it'd be in the code at first but when I "couldn't find it" due to "n00b blindness" I started to look in the code.