the 'cache' folder

A home for really quick one-liner thoughts about what we need to fix or do or whatever. If they spark discussion we move it, otherwise this is like post-it notes.

Moderator: Dracones

the 'cache' folder

Postby EdB » Mon Jul 05, 2010 6:13 pm

I honestly don't know, but might that guy be okay somewhere else? I know it isn't actually media, but media gets a ton of evocache folders so we're caching stuff in media. Perhaps we can have cache go inside media?

He's an odd one I guess. He's not an included bit so inc is wrong. He's not a template or part of viewing admin. He's not a plugin. Hey maybe cache is a resource and thus might like living in /qp_rsc/ ?
EdB
Dracone
User avatar
 
Posts: 1467
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: the 'cache' folder

Postby Tblue » Mon Jul 05, 2010 6:25 pm

Hmm, apropos .evocache... Couldn't we store the thumbnails in a central location? I mean, we already have the global cache folder; currently it's used for evo tinyMCE plugin and for caching pages (that stuff needs updating, by the way!) -- so why not use it for thumbnails, too?

Just an idea, not sure whether that would make sense or is worth implementing at all...

Hmm, is cache a resource? Dunno... Well, actually, when I think of resources I think of CSS, JavaScript and images.
Cache doesn't seem to fit into any of the existing folders, so maybe the root directory is the right place?
Tblue
Dracone
User avatar
 
Posts: 289
Joined: Sat Nov 21, 2009 1:35 pm
Location: Berlin, Germany

Re: the 'cache' folder

Postby EdB » Mon Jul 05, 2010 7:04 pm

Yeah I hear ya on what 'resource' implies. I'm hip to leaving cache in root - just figured I'd ask.

Making evocache (note the name :( ) move to cache would be hard. Real hard. For me anyway. I once spent way too much time trying to make evo do /media/blogs/blogname/.evocache/file_dimension/file_name.ext instead of the current /media/blogs/blogname/.evocache/file_name.ext/file_dimension.ext because to me having the displayed image not have the image's actual name is not right. Anyway I got totally lost and gave up. It still bugs me though.

So what you're saying is maybe we should be doing something like /qp_cache/blog_name/whatever_else_follows_that/until_finally_a_file.ext ? That'd put immediate good use to the cache folder, but if memory serves me ... ah heck it doesn't. Yabs might have a thought or two on this is all I know, but to me this sounds good. Are you up for doing it? If so can you rename evocache or maybe even get rid of the need for that layer in the process?
EdB
Dracone
User avatar
 
Posts: 1467
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: the 'cache' folder

Postby Yabs » Mon Jul 05, 2010 7:51 pm

pros :
central location makes "rm -fr ~/path/.(evo :-S)cache/" kills cache, completely ;)

cons
central location makes refreshing cache for a changed file kill all caches ... *if* we follow current evo "kill cache for /foo/" mentality
lots of folders/files in ~/path/.cache/ ... huge scrollbar in gui\lots of "next" in cli ls -la | more ;)

¥
I may have opened the door but you entered of your own free will

Image Techno Babble II
Image Tacky Pad 3
Yabs
Dracone
User avatar
 
Posts: 819
Joined: Sat Nov 21, 2009 9:59 am

Re: the 'cache' folder

Postby EdB » Mon Jul 05, 2010 8:01 pm

Where do we have a cache-killer other than the Tools->misc thing? Just curious. Oh wait maybe in the "use page cache" thing that I never turned on because I figured it was more fgc? Assuming this to be the case is it something we can correct by a deeper interface, or is this idea something best put off till after v0 ... if at all?
EdB
Dracone
User avatar
 
Posts: 1467
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: the 'cache' folder

Postby Yabs » Mon Jul 05, 2010 9:37 pm

Delete/rename/move a file (via admin/gui) > kills (.evo)cache ;)

¥
I may have opened the door but you entered of your own free will

Image Techno Babble II
Image Tacky Pad 3
Yabs
Dracone
User avatar
 
Posts: 819
Joined: Sat Nov 21, 2009 9:59 am

Re: the 'cache' folder

Postby Tblue » Wed Jul 07, 2010 1:44 pm

On a second thought, perhaps having separate .evocaches is not a problem at all. It makes things easier and the issue with moving files breaking the cache would be there with both approaches.
Tblue
Dracone
User avatar
 
Posts: 289
Joined: Sat Nov 21, 2009 1:35 pm
Location: Berlin, Germany

Re: the 'cache' folder

Postby EdB » Wed Jul 07, 2010 3:38 pm

Deleting a link to a file then the file only removes the evocache for that particular file - just tested.

Another pro is there would be no need for .evocache at all because that is there only to (a) give us something else to rename and (b) to begin with a dot so the file manager doesn't show them.
EdB
Dracone
User avatar
 
Posts: 1467
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Re: the 'cache' folder

Postby Yabs » Wed Jul 07, 2010 5:41 pm

Bollocks, you just found some sloppy coding ( took me ages to notice the @ suppression ), it *tries* to kill .evocache :(

Code: Select all
   /**
    * Delete cache for a file
    */
   function rm_cache()
   {
      global $Messages;

      // Remove cached elts for teh current file:
      $ads_filecache = $this->get_ads_evocache( false );
      if( $ads_filecache[0] == '!' )
      {
         // This creates unwanted noise
         // $Messages->add( 'Cannot remove .evocache for file. - '.$ads_filecache, 'error' );
      }
      else
      {
         rmdir_r( $ads_filecache );

         // In case cache is now empty, delete the folder:
         $adp_evocache = $this->_dir.'.evocache';
         @rmdir( $adp_evocache );
      }
   }


Pretty sure it used to succeed in one variation of evo, or maybe I was just always missing the "@" ;-S

¥
I may have opened the door but you entered of your own free will

Image Techno Babble II
Image Tacky Pad 3
Yabs
Dracone
User avatar
 
Posts: 819
Joined: Sat Nov 21, 2009 9:59 am

Re: the 'cache' folder

Postby EdB » Thu Jul 29, 2010 7:56 am

So what's the bottom line on this whole cache thing? Should 'evocache' vanish by moving all that stuff into cache and thus rendering the need for a leading dot to hide the folder from file manager, or should we just rename cache and call it a day?
EdB
Dracone
User avatar
 
Posts: 1467
Joined: Sun Nov 22, 2009 7:20 am
Location: Maricopa Arizona

Next

Return to Quickies

Who is online

Users browsing this forum: No registered users and 1 guest

cron