The Mystic Cave is a neutral dungeon that you're allowed to attack and earn resources from a limited amount of times each day depending on your level.
In order to effectively farm the Mystic Cave you should be trying to tackle the highest level of the cave while losing none of your troops. The enemies in the cave change daily so it's difficult to tell exactly which troops you'll need to farm with. Generally for lower levels of the cave Archers have no problem with as the enemies tend to be infantry. At level 5 it can be either Infantry or Cavalry. Generally if its all infantry you'll be able to just go in with Archers and another Infantry type and be able to walk out without a scratch.
I don't really know what the actual numbers are, but just for a gist, if there are 941 Spearman and 571 Axmen then I attack with about 5000 Archers and 4000 Axmen. Now I haven't done very much experimenting with this at all and you may be able to use MUCH less than this. But this is just what I've had time to try with and I'm getting good results. This is with level 11 upgrades on axes only.
Your goal should be to be able to farm that level 5 cave in the beginning. After that start moving forward and try to farm the higher levels. Always remember the rock paper scissors system that the units use.
Swords weak against Spears
Spears weak against Axes
Axes weak against Swords
Archers beat all Infantry but are weak against Calvary