Ion selectivity studied by Density Functional Theory at the Restricted Primitive and Primitive Models inside charged spherical cavities. Results show that, at lower electric potentials counterions accumulate at the wall while coions prefer to aggregate in the middle of the cavity. The capacitance curve has a camel shape at low concentration, while a transition is observed from camel to bell shape with increasing concentration. Also at constant concentration this transition happened with decreasing the cavity size. The effect of electro-neutrality deviation in small charged cavities on the shape of the capacitance curve show that the capacitance curve has a bell shape when electro-neutrality parameter decreases with surface charge. The diffuse potential and diffuse capacitance is strongly affected by ion charge. As the sign of diffuse potential changes with electric potential depending on concentration for electrolytes with divalent counter ions. It causes that the diffuse potential passes from zero which leads to an infinite value for diffuse capacitances. The studies of asymmetric electrolytes for determination of stern capacitance shows that at a constant concentration is a certain surface charge, which the stern thickness changes from half diameter of coion to half diameter of counterion when the size of counterion is larger than coion