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):
this doesn't throw error, uses default folder (/cache)
var sourcediskcacheplugin = new sourcediskcacheplugin {virtualcachedir = "~/app_data/cache"}; config.current.plugins.getorinstall(sourcediskcacheplugin);
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
Post a Comment