brianwigfield / Meek

Meek CMS for MVC 3
MIT License
18 stars 11 forks source link

Issues with Cache / CacheDependency #3

Closed olaj closed 12 years ago

olaj commented 12 years ago

I have some cache issues with Meek. I have tried both with SQL and FileSystem as storage but the only thing i can do to refresh the cache after changes is to do some changes in the Web.Config. It actually doesn't even work even if i recycle the application pool or do a iisreset.

The worst thing is that this only happens on my server and not localhost. I use the same web.config with some minor changes. I don't know where to start really. Have you had any issues with this before? Any idea where to start?

And btw! Love Meek, been looking for a CMS like this for a long time.

brianwigfield commented 12 years ago

Is the site running in full or partial trust on the server? That would be a starting point to help debug it. On May 11, 2012 7:44 AM, "Ola Johansson" < reply@reply.github.com> wrote:

I have some cache issues with Meek. I have tried both with SQL and FileSystem as storage but the only thing i can do to refresh the cache after changes is to do some changes in the Web.Config. It actually doesn't even work even if i recycle the application pool or do a iisreset.

The worst thing is that this only happens on my server and not localhost. I use the same web.config with some minor changes. I don't know where to start really. Have you had any issues with this before? Any idea where to start?

And btw! Love Meek, been looking for a CMS like this for a long time.


Reply to this email directly or view it on GitHub: https://github.com/brianwigfield/Meek/issues/3

olaj commented 12 years ago

I run this on my own server and it's running in full trust. Guess i will have to dig a bit deeper and see what i can figure out. Let me know if you have any more ideas about where to look!

olaj commented 12 years ago

I can't figure this out :/

There must be some stupid setting (or some combination of settings) that is causing this. I can't reproduce the cache issue locally and i can't get it to work on my server.

It does work though if i upload a "clean" project with just Meek and like one field. I only use partial content btw.

It's always fresh data in the form when i edit a partial area so the data is saved correctly and so on.

I also noticed now that it works fine with the InMemory storage system.

brianwigfield commented 12 years ago

I will take a look in depth at this soon, in the meantime you could revert to the last version of meek, it does not include caching.

Thanks for the detailed info, it should help me reproduce the problem, by chance is the code on public github repo? On Monday, May 14, 2012, Ola Johansson wrote:

I can't figure this out :/

There must be some stupid setting (or some combination of settings) that is causing this. I can't reproduce the cache issue locally and i can't get it to work on my server.

It does work though if i upload a "clean" project with just Meek and like one field. I only use partial content btw.

It's always fresh data in the form when i edit a partial area so the data is saved correctly and so on.

I also noticed now that it works fine with the InMemory storage system.


Reply to this email directly or view it on GitHub: https://github.com/brianwigfield/Meek/issues/3#issuecomment-5685960

Brian Wigfield Senior Consultant AdventureTech http://www.adventuretechgroup.com/ brian.wigfield@adventuretechgroup.com ouremail@adventuretechgroup.com Office: 913.953.8454 @hermit4hire http://twitter.com/hermit4hire | LinkedInhttp://www.linkedin.com/in/brianwigfield | Blog http://www.adventuretechgroup.com/people/brianwigfield/

olaj commented 12 years ago

No .. sorry. It's private code used for my site http://alternativeto.net so i rather not give it away. But i could send you web.config, global.asax and stuff like that. It's a bit of a complex setup with WebForms / MVC mixed together and routes and stuff like that is kind of customized.

Let me know if you need anything!

brianwigfield commented 12 years ago

Ok so I found somebody having the same issue. His issue was he added Meek to the wrong project first and forgot to remove it so he had two projects both calling the App_Start bootstrapper when the site starts and it ends up breaking the cache dependencies.

Can you quickly check and see if this is something you have going on as well?

olaj commented 12 years ago

Look at that, seems like it works now!

The issue was that on my localhost i had to add this Meek.BootStrapper.Initialize(); to Application_Start() to make it work, otherwise i just gor an "object is not set to ..." error. Well, i guess i have to figure out why i need that localhost and not on the server. What is that webactivator thing actually do? Otherwise i can of course always just do a if thingy, but i suppose you might be curious what is causing it!

brianwigfield commented 12 years ago

Interesting, the webactivator is a nuget package that pretty much all other nuget packages use when the need to add startup code since you can't add code to somebody's global.asax when your package gets installed.

https://bitbucket.org/davidebbo/webactivator

It sounds like its just not executing on your localhost, you can remove the code from the app_start and initialize it yourself in your application_start() but just a warning next time you upgrade from nuget it will probably put it right back in there.

I think I will go ahead and do a bit of work so that the initialization is idempotent to prevent these problems on my side.