synchronized void save(NotificationManager mNotificationManager,int id){
  if (cache.size() >= size) {
    remove(mNotificationManager);
  }
  cache.add(0,id);
}

synchronized void save ( NotificationManager mNotificationManager , int id ) { if ( cache . size ( ) >= size ) { remove ( mNotificationManager ) ; } cache . add ( 0 , id ) ; }
save notification id , canceling and removing the oldest notification if cache is full
