I assume you are talking about what FileCacheLoader does; JBoss Cache itself does not use files, and other cache loader implementations use whatever files the underlying database uses.
FileCacheLoader creates one directory per node. If the node contains data, the directory will have one file containing a serialized form of the data map.
If you have more files than the file system allows, it will break. We generally recommend FileCacheLoader for early development or prototyping anyway; for a large production cache you would be better off with something like JDBCCacheLoader.