imageresizer - How to configure cache folder for SourceDiskCache? -


i understand documentation sourcediskcache folder cannot configured using xml configuration file , available "through code installation". can't figure out how!

i need configure custom folder. have tried few different things, different results (both in application_start):

  1. this doesn't throw error, uses default folder (/cache)

    var sourcediskcacheplugin = new sourcediskcacheplugin {virtualcachedir = "~/app_data/cache"}; config.current.plugins.getorinstall(sourcediskcacheplugin); 
  2. this (and other variations have tried) throws error "sourcediskcache settings may not adjusted after started."

    new sourcediskcacheplugin().install(config.current); config.current.plugins.get<sourcediskcacheplugin>().virtualcachedir = "~/app_data/cache"; 

how can configure this?

also, documentation states sourcediskcache in beta - still case, , xml configuration ever available?

this normal way configure , install it: var plugin = new sourcediskcacheplugin() plugin.virtualcachedir = "~/app_data/cache"; plugin.install(config.current);

if code running more once, use config.current.plugins.getorinstall(plugin); it's best if install plugin during application_start.

however, approach #1 question should work equally well, long you've set right ntfs permissions on app_data.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -