BaCl2 and Ca‌Ç‌l2 are compounds of alkaline earth metals and they are more extensively hydrated than those of alkali metals. This is because, the hydration enthalpies of alkaline earth metal ions are larger than those of alkali metal ion. But among alkali metal chloride, LiCl is more hydrated. This is because lithium is smallest in size (among alkali metals). That's why, Li+ion can polarise water molecules more easily than other alkali metals. Consequently, water molecules get attached to lithium salts as trihydrated lithium chloride [LiCl⋅3H2O]. As the size of alkali metals increases (i.e. down the group) their polarising power deceases. Therefore, other alkali metals ions usually form anhydrous salts.