Please report confirmed 4.1 bugs in our issue tracker at CodePlex

suggestion medias with cache mechanism

12/11/2009 6:17:31 PMAvatarLefterisLocation: Heraklion Creteposts: 75Karma: 26

Why dont you create a cache mechanism for medias?

Just like content has xml caching, then the same for medias.

As we know, GetMedia is calling database everytime and is resource consuming ehh....

It would me nice to have a library function to parse media nodes from an xml cache.

Think about it.

12/11/2009 7:23:35 PMAvatarDouglas RobarLocation: CB1 9HBMVP.admin.posts: 2546Karma: 1365
Comment with ID: 21209

I would love this as well, and I think there is some conversation about it in the core team.

Until then, maybe you can make a docType with an upload field on it? Then you'd use the content tree instead of the media section (and content pickers instead of media pickers). Then the media would be cached and you wouldn't need to use GetMedia() with its database hit.

cheers,
doug.

12/12/2009 6:24:38 AMAvatarslaceLocation: Coogee, Sydney, AustraliaCore.posts: 561Karma: 1514
Comment with ID: 21225

You can use Umbraco Examine to do it, which is just a Lucene.NET indexer but can index anything based on CMSNode which Media and Documents are

12/12/2009 10:56:17 AMAvatarLefterisLocation: Heraklion Creteposts: 75Karma: 26
Comment with ID: 21228

I've allready tried to create a cached mechanism with xml and some library functions with semi-success using media node events.

The problem is that medias has only create and delete events, and not move or sort events. That makes it insufficient.

So, any time I want to sort, or move a media node, I have to recreate the cache and xml manually.

I would love to have complete media node events as the content events.

1/7/2010 9:45:18 PMAvatarAnders Burla JohansenLocation: Silkeborg, Denmarkposts: 144Karma: 117
Comment with ID: 22766

Will Lefteris have his wish come true for the events for media and  caching for media in 4.1?

1/7/2010 10:38:26 PMAvatarslaceLocation: Coogee, Sydney, AustraliaCore.posts: 561Karma: 1514
Comment with ID: 22772

There's a Media Cache package available - http://our.umbraco.org/projects/cultiv-mediacache

1/8/2010 8:02:03 AMAvatarAnders Burla JohansenLocation: Silkeborg, Denmarkposts: 144Karma: 117
Comment with ID: 22782

@slace - that is indeed a nice package. But it could be great to have caching as default in umbraco so you dont need to rewrite your xslt.

1/8/2010 8:09:48 AMAvatarslaceLocation: Coogee, Sydney, AustraliaCore.posts: 561Karma: 1514
Comment with ID: 22785

You don't need to write your own, Sebastiaan has done it for you :P

But it may or may not be coming in 4.1 (I like to be vague ;)).

1/8/2010 2:31:10 PMAvatarAnders Burla JohansenLocation: Silkeborg, Denmarkposts: 144Karma: 117
Comment with ID: 22817

Yes but Sebastiaan wont rewrite all my xslt that use GetMedia, or will he? :)

Please login or Sign up To post replies