Javascript Cache

Good Evening to everyone.

I have an issue with cache on apache 2.4. First of all i would like to know which .htaccess file overwrites the other. I have 3 .htaccess files> pub| pub/static| pub/media<.
Second with my apache/pub .htaccess configuration js cache should be set to 1 year or max-age=31536000. Instead when checking with chrome dev tools i get s-maxage=10 seconds.

I tried googlepagespeed, amazon cloudfront, but I can’t get javascript(mytheme had a massive heavyload js’s) load or cache through them. It is not related with this topic but whilst media cdn works like a charm when I add static files cdn admin and frontend breaks.

related part of pub/ .htcaccess
<IfModule mod_expires.c> 
  # CSS, JavaScript
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType application/x-shockwave-flash "access plus 1 month"

related part of PUB/STATIC . htaccess

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresActive On

    # Data
    <FilesMatch \.(zip|gz|gzip|bz2|csv|xml)$>
        ExpiresDefault "access plus 0 seconds"
    </FilesMatch>
    ExpiresByType text/xml "access plus 0 seconds"
    ExpiresByType text/csv "access plus 0 seconds"
    ExpiresByType application/json "access plus 0 seconds"
    ExpiresByType application/zip "access plus 0 seconds"
    ExpiresByType application/x-gzip "access plus 0 seconds"
    ExpiresByType application/x-bzip2 "access plus 0 seconds"

    # CSS, JavaScript, html
    <FilesMatch \.(css|js|html|json)$>
        ExpiresDefault "access plus 1 year"
    </FilesMatch>
    ExpiresByType text/css "access plus 1 year"
    ExpiresByType text/html "access plus 1 year"
    ExpiresByType application/javascript "access plus 1 year"
    ExpiresByType application/json "access plus 1 year"